Avoid using mb_* function for URL length calculation

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ř <michal@cihar.com>
This commit is contained in:
Michal Čihař 2017-11-16 14:37:32 +01:00
parent 50c65bc3fb
commit 1a0bb3ebd5

View File

@ -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;