From 1a0bb3ebd54896383aa9de7bf5a2ca62001d249c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 16 Nov 2017 14:37:32 +0100 Subject: [PATCH] Avoid using mb_* function for URL length calculation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is handled in bytes on the webserver side, so use limits in bytes not in chars as mb_strlen does. Signed-off-by: Michal Čihař --- libraries/classes/Util.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/classes/Util.php b/libraries/classes/Util.php index d7f13ae412..729dee5efc 100644 --- a/libraries/classes/Util.php +++ b/libraries/classes/Util.php @@ -1717,7 +1717,7 @@ class Util $url, $message, $tag_params = array(), $strip_img = false, $target = '', $force_button = false ) { - $url_length = mb_strlen($url); + $url_length = strlen($url); if (! is_array($tag_params)) { $tmp = $tag_params; @@ -1760,7 +1760,7 @@ class Util } list(, $eachval) = explode('=', $query_pair); - if (mb_strlen($eachval) > $suhosin_get_MaxValueLength + if (strlen($eachval) > $suhosin_get_MaxValueLength ) { $in_suhosin_limits = false; break;