From 4819b3029260a2f61031de1d45d93a43d17a006d Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Thu, 7 Apr 2022 16:50:05 +0800 Subject: [PATCH 1/2] * Fix bug #18018. --- module/company/model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/company/model.php b/module/company/model.php index e189200163..be7f081894 100644 --- a/module/company/model.php +++ b/module/company/model.php @@ -137,7 +137,9 @@ class companyModel extends model */ public function update() { - $company = fixer::input('post')->get(); + $company = fixer::input('post') + ->stripTags('name') + ->get(); if($company->website == 'http://') $company->website = ''; if($company->backyard == 'http://') $company->backyard = ''; $companyID = $this->app->company->id; From 020834ec7a6197020cc44c7b0d5fca99d500760e Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Thu, 7 Apr 2022 16:50:28 +0800 Subject: [PATCH 2/2] * Fix bug #11026. --- module/repo/control.php | 2 +- module/repo/view/browse.html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/repo/control.php b/module/repo/control.php index d60569ed4f..b3df7d5b68 100644 --- a/module/repo/control.php +++ b/module/repo/control.php @@ -360,7 +360,7 @@ class repo extends control public function browse($repoID = 0, $branchID = '', $objectID = 0, $path = '', $revision = 'HEAD', $refresh = 0) { $repoID = $this->repo->saveState($repoID, $objectID); - if($branchID) $branchID = base64_decode($branchID); + if($branchID) $branchID = base64_decode(urldecode($branchID)); /* Get path and refresh. */ if($this->get->repoPath) $path = $this->get->repoPath; diff --git a/module/repo/view/browse.html.php b/module/repo/view/browse.html.php index 3f6fdedf9c..2fa67be799 100644 --- a/module/repo/view/browse.html.php +++ b/module/repo/view/browse.html.php @@ -31,7 +31,7 @@ foreach($branches as $id => $branchName) { $isSelected = $id == $branchID ? 'class="selected"' : ''; - $base64BranchID = base64_encode($id); + $base64BranchID = urlencode(base64_encode($id)); echo "
  • " . html::a($this->createLink('repo', 'browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"), $branchName, '', "title='{$branchName}' class='text-ellipsis' data-app='{$app->tab}'") . "
  • "; } ?>