From 6fbf349155ff92c643d835246016a76351417cf1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 11 Apr 2019 16:15:55 +0300 Subject: [PATCH] add hidden _SKIP_SESSION_UA_CHECKS tunable --- include/sessions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sessions.php b/include/sessions.php index c27eb98b0..ca9f169d8 100644 --- a/include/sessions.php +++ b/include/sessions.php @@ -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; }