iis-windows issue with useragent
-
I know your answer, you don’t support IIS…
but what about fixing these 2 lines fix once for all?
Every time I update the plugin , I must do that fix over and over.
if $ua is longer than 260 characters, fnmatch crash.
————————————–
utils.php, function isUABlockedpublic static function isUABlocked($uaPattern, $ua) {
try {
return fnmatch($uaPattern, $ua, FNM_CASEFOLD);
} catch (Exception $e) {
$ua = substr($ua, 0, 255);
return fnmatch($uaPattern, $ua, FNM_CASEFOLD);
}
}
————————————–
almost the same function in wfutils.php, line 1269public static function isUABlocked($uaPattern){
$ua = !empty($_SERVER[‘HTTP_USER_AGENT’]) ? $_SERVER[‘HTTP_USER_AGENT’] : ”;
try {
return fnmatch($uaPattern, $ua, FNM_CASEFOLD);
} catch (Exception $e) {
$ua = substr($ua, 0, 255);
return fnmatch($uaPattern, $ua, FNM_CASEFOLD);
}
}
- The topic ‘iis-windows issue with useragent’ is closed to new replies.