do not invalidate session when version_static and user agent changes

This commit is contained in:
Andrew Dolgov 2015-01-30 13:14:19 +03:00
parent 206326c219
commit 3192fb43bc
1 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@
function validate_session() { function validate_session() {
if (SINGLE_USER_MODE) return true; if (SINGLE_USER_MODE) return true;
if (VERSION_STATIC != $_SESSION["version"]) return false; //if (VERSION_STATIC != $_SESSION["version"]) return false;
$check_ip = $_SESSION['ip_address']; $check_ip = $_SESSION['ip_address'];
@ -68,11 +68,11 @@
return false; return false;
} }
if (sha1($_SERVER['HTTP_USER_AGENT']) != $_SESSION["user_agent"]) { /* if (sha1($_SERVER['HTTP_USER_AGENT']) != $_SESSION["user_agent"]) {
$_SESSION["login_error_msg"] = $_SESSION["login_error_msg"] =
__("Session failed to validate (user agent changed)"); __("Session failed to validate (user agent changed)");
return false; return false;
} } */
if ($_SESSION["uid"]) { if ($_SESSION["uid"]) {
$result = Db::get()->query( $result = Db::get()->query(