From d769a0f75a42323a38cce3637629a4750443e67c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 29 Nov 2010 21:29:58 +0300 Subject: [PATCH] fix session ip checking --- functions.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/functions.php b/functions.php index 7c12d538..17581789 100644 --- a/functions.php +++ b/functions.php @@ -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; -- 2.39.5