1
0
Эх сурвалжийг харах

fix index in cookie string

rajven 2 жил өмнө
parent
commit
bd8016c997

+ 1 - 1
html/inc/auth.utils.php

@@ -70,7 +70,7 @@ function login($db)
             #check session
             $current_hash = md5($session['id'] . ":" . $session['session_key'] . ":" . $auth_ip);
             #enable access
-            if ($current_hash === $data_array[3]) {
+            if (isset($data_array[2]) and $current_hash === $data_array[2]) {
                 $auth_record = get_record_sql($db, "SELECT * FROM `Customers` WHERE id='" . $data_array[0] . "'");
                 $_SESSION['IP'] = $auth_ip;
                 $_SESSION['user_id'] = $auth_record['id'];