Code enhancement for cookie wf_loginalerted_
-
On high traffic websites with a lot of user logins from different IPs (mobile phones), setting a log of cookies causes the following:
400 Bad Request Your browser sent a request that this server could not understand. Size of a request header field exceeds server limit.
This happens because wordfence creates a lot of cookies with the wf_loginalerted_ prefix.
This should happen just for administrators: https://i.snipboard.io/7nahgO.jpgInstead, the cookie is set for non-admins as well. Because the code is simplistic:
if (wfConfig::get('alertOn_firstAdminLoginOnly') || wfConfig::get('alertOn_firstNonAdminLoginOnly')) { wfUtils::setcookie($cookiename, $cookievalue, time() + (86400 * 365), '/', null, wfUtils::isFullSSL(), true); }
Should be implemented this way: https://gist.github.com/mircobabini/e0fcdd87288ebfe7b7f40e65203ae201
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Code enhancement for cookie wf_loginalerted_’ is closed to new replies.