Fix url generator XSS (#12507)

This commit is contained in:
Jellyfrog 2021-02-08 02:43:34 +01:00 committed by GitHub
parent 3d02e76e0e
commit ee1606d799
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -294,7 +294,7 @@ class Url
$url = empty($vars) ? '' : $prefix;
foreach ($vars as $var => $value) {
if ($value == '0' || $value != '' && ! Str::contains($var, 'opt') && ! is_numeric($var)) {
$url .= $var . '=' . urlencode($value) . '/';
$url .= urlencode($var) . '=' . urlencode($value) . '/';
}
}