From bcb656511efa1a679126e0a01565fc5e160c559d Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Mon, 10 Sep 2018 18:16:58 +0200 Subject: [PATCH] Deny pages with slug equal to filters --- bl-kernel/url.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bl-kernel/url.class.php b/bl-kernel/url.class.php index 3aa0b998..0bf436b2 100644 --- a/bl-kernel/url.class.php +++ b/bl-kernel/url.class.php @@ -52,7 +52,7 @@ class Url // $filterFull = '/base_url/category/' $filterFull = ltrim($filterURI, '/'); $filterFull = HTML_PATH_ROOT.$filterFull; - $filterFullLenght = mb_strlen($filterFull, CHARSET); + $filterFullLenght = Text::length($filterFull); // $filterFullwoSlash = '/base_url/category' $filterFullwoSlash = ltrim($filterURIwoSlash, '/'); @@ -61,7 +61,7 @@ class Url $subString = mb_substr($this->uri, 0, $filterFullLenght, CHARSET); // Check coincidence without the last slash at the end, this case is notfound - if (($subString==$filterURIwoSlash) && ($filterName!='admin')) { + if ($subString==$filterURIwoSlash) { $this->setNotFound(); return false; }