add hidden _SKIP_SESSION_UA_CHECKS tunable

This commit is contained in:
Andrew Dolgov 2019-04-11 16:15:55 +03:00
parent c7ad4ad2d4
commit 6fbf349155
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@
if ($_SESSION["uid"]) {
if ($_SESSION["user_agent"] != sha1($_SERVER['HTTP_USER_AGENT'])) {
if (!defined('_SESSION_SKIP_UA_CHECKS') && $_SESSION["user_agent"] != sha1($_SERVER['HTTP_USER_AGENT'])) {
$_SESSION["login_error_msg"] = __("Session failed to validate (UA changed).");
return false;
}