• Resolved foxontherock

    (@foxontherock)


    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 isUABlocked

    public 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 1269

    public 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);
    }
    }

Viewing 1 replies (of 1 total)
  • Hi,
    Thanks for bringing this issue to us, I’ve already added your input here to a similar ticket we have on our system regarding this issue (internal reference number: #FB4103) although I’m not sure if this can be seen in one of the plugin’s upcoming releases or not, but all suggestions are evaluated by our dev team and considered seriously.

    Thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘iis-windows issue with useragent’ is closed to new replies.