Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #2591

  • Loading branch information...
commit 76cfd3951484868a9ba87ce31f341e7a88e77fc9 1 parent eefde54
@vantienvnn vantienvnn authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 cake/libs/controller/components/cookie.php
View
6 cake/libs/controller/components/cookie.php
@@ -425,20 +425,22 @@ function __decrypt($values) {
if (is_array($value)) {
foreach ($value as $key => $val) {
$pos = strpos($val, 'Q2FrZQ==.');
- $decrypted[$name][$key] = $this->__explode($val);
if ($pos !== false) {
$val = substr($val, 8);
$decrypted[$name][$key] = $this->__explode(Security::$type(base64_decode($val), $this->key));
+ } else {
+ $decrypted[$name][$key] = $this->__explode($val);
}
}
} else {
$pos = strpos($value, 'Q2FrZQ==.');
- $decrypted[$name] = $this->__explode($value);
if ($pos !== false) {
$value = substr($value, 8);
$decrypted[$name] = $this->__explode(Security::$type(base64_decode($value), $this->key));
+ } else {
+ $decrypted[$name] = $this->__explode($value);
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.