[-] Classes : #PSCFI-3880 : BugFix mbstring overload on Rijndael encrypt-decrypt

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11019 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
fGaillard
2011-12-07 09:21:05 +00:00
parent 3d1176686f
commit c8fc8d1733
2 changed files with 21 additions and 7 deletions
+6 -3
View File
@@ -254,10 +254,12 @@ class CookieCore
{
/* Decrypt cookie content */
$content = $this->_cipherTool->decrypt($_COOKIE[$this->_name]);
//printf("\$content = %s<br />", $content);
/* Get cookie checksum */
$checksum = crc32($this->_iv.substr($content, 0, strrpos($content, '¤') + 2));
//printf("\$checksum = %s<br />", $checksum);
/* Unserialize cookie content */
$tmpTab = explode('¤', $content);
foreach ($tmpTab as $keyAndValue)
@@ -269,7 +271,8 @@ class CookieCore
/* Blowfish fix */
if (isset($this->_content['checksum']))
$this->_content['checksum'] = (int)($this->_content['checksum']);
//printf("\$this->_content['checksum'] = %s<br />", $this->_content['checksum']);
//die();
/* Check if cookie has not been modified */
if (!isset($this->_content['checksum']) || $this->_content['checksum'] != $checksum)
$this->logout();