Commit 2a760672 authored by Alex Ne's avatar Alex Ne

Chek session string id

parent 495cb234
...@@ -76,7 +76,8 @@ class Session extends \X\Security\Crypto\IDEA { ...@@ -76,7 +76,8 @@ class Session extends \X\Security\Crypto\IDEA {
$In = new \X_Input(); $In = new \X_Input();
$this->session = $In->CookieValue($this->session_name, false) ?: $In->Request($this->session_name, "")->string(); $this->session = $In->CookieValue($this->session_name, false) ?: $In->Request($this->session_name, "")->string();
if (strlen($this->session) > 0) { if (strlen($this->session) > 0) {
if (is_array($session_data = $this->explode(gzuncompress($this->decrypt_b64($this->session))))) { if (is_string($SessionString = $this->decrypt_b64($this->session))) {
if (is_array($session_data = $this->explode(gzuncompress($SessionString)))) {
if (isset($session_data["cs"])) { if (isset($session_data["cs"])) {
if ($session_data["cs"] == $this->crypto_checksum($session_data)) { if ($session_data["cs"] == $this->crypto_checksum($session_data)) {
$this->session_data = $session_data; $this->session_data = $session_data;
...@@ -87,6 +88,7 @@ class Session extends \X\Security\Crypto\IDEA { ...@@ -87,6 +88,7 @@ class Session extends \X\Security\Crypto\IDEA {
} }
} }
} }
}
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment