From 84fc783df502656dca38f879ef524bd07f94469b Mon Sep 17 00:00:00 2001 From: StanByes <73603926+StanByes@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:15:17 +0200 Subject: [PATCH 1/2] Patch seo load with URL contains ' --- app/Controller/AppController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Controller/AppController.php b/app/Controller/AppController.php index 7baec62e..34199c81 100755 --- a/app/Controller/AppController.php +++ b/app/Controller/AppController.php @@ -589,6 +589,7 @@ public function __initSeoConfiguration() $this->loadModel('Seo'); $default = $this->Seo->find('first', ["conditions" => ['page' => null]])['Seo']; $current_url = $this->here; + $current_url = str_replace("'", "\'", $current_url); $get_page = []; $condition = ["'" . $current_url . "' LIKE CONCAT(page, '%')"]; From a48c71a09c693a8b7f5b5ad694bb99ec34114f93 Mon Sep 17 00:00:00 2001 From: StanByes <73603926+StanByes@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:16:14 +0200 Subject: [PATCH 2/2] Patch maintenance with url contains ' --- app/Model/Maintenance.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Model/Maintenance.php b/app/Model/Maintenance.php index e711b868..5ee6f1a8 100644 --- a/app/Model/Maintenance.php +++ b/app/Model/Maintenance.php @@ -4,6 +4,7 @@ class Maintenance extends AppModel { function checkMaintenance($url, $utilComponent) { + $url = str_replace("'", "\'", $url); $use_sqlite = $utilComponent->useSqlite(); $condition = ["'" . $url . "' LIKE CONCAT(Maintenance.url, '%')", "active" => 1]; @@ -29,4 +30,4 @@ function isFullMaintenance() $result = $result["Maintenance"]; return $result; } -} \ No newline at end of file +}