includes/sessions.php
changeset 484 340c81fdd350
parent 480 d5376271f96b
child 485 7134d4bf7a23
equal deleted inserted replaced
483:2cb1c8a6d3db 484:340c81fdd350
  1265       // echo '(debug) $session->validate_session: access to this auth level denied<br />';
  1265       // echo '(debug) $session->validate_session: access to this auth level denied<br />';
  1266       return false;
  1266       return false;
  1267     }
  1267     }
  1268     if($ip != $row['source_ip'])
  1268     if($ip != $row['source_ip'])
  1269     {
  1269     {
       
  1270       // Special exception for 1.1.x upgrade - the 1.1.3 upgrade changes the size of the column and this is what validate_session
       
  1271       // expects, but if the column size hasn't changed yet just check the first 10 digits of the IP.
       
  1272       $fail = true;
       
  1273       if ( defined('IN_ENANO_UPGRADE') )
       
  1274       {
       
  1275         if ( installer_enano_version() == '1.1.3' )
       
  1276           $fail = false;
       
  1277       }
  1270       // Failed IP address check
  1278       // Failed IP address check
  1271       // echo '(debug) $session->validate_session: IP address mismatch<br />';
  1279       // echo '(debug) $session->validate_session: IP address mismatch<br />';
  1272       return false;
  1280       if ( $fail )
       
  1281         return false;
  1273     }
  1282     }
  1274     
  1283     
  1275     // Do the password validation
  1284     // Do the password validation
  1276     $real_pass = $aes->decrypt($row['password'], $this->private_key, ENC_HEX);
  1285     $real_pass = $aes->decrypt($row['password'], $this->private_key, ENC_HEX);
  1277     
  1286