fix session ip checking

This commit is contained in:
Andrew Dolgov 2010-11-29 21:29:58 +03:00
parent 741b60909f
commit d769a0f75a
1 changed files with 5 additions and 3 deletions

View File

@ -1917,9 +1917,11 @@
break;
};
if ($check_ip && strpos($_SERVER['REMOTE_ADDR'], $check_ip) !== 0)
$_SESSION["login_error_msg"] =
__("Session failed to validate (incorrect IP)");
if ($check_ip && strpos($_SERVER['REMOTE_ADDR'], $check_ip) !== 0) {
$_SESSION["login_error_msg"] =
__("Session failed to validate (incorrect IP)");
return false;
}
if ($_SESSION["ref_schema_version"] != get_schema_version($link, true))
return false;