From 655a5fe0aebae021ad8015f9efbcf604a09533a8 Mon Sep 17 00:00:00 2001 From: Ikuo Degawa Date: Sat, 10 Jun 2017 15:20:25 +0900 Subject: [PATCH] Fix broken cookie issue #10724 This change makes Security::cipher() encoding and decoding same as 2.7 and below. --- lib/Cake/Utility/Security.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Utility/Security.php b/lib/Cake/Utility/Security.php index 1068bdfdf..3aa2a4150 100644 --- a/lib/Cake/Utility/Security.php +++ b/lib/Cake/Utility/Security.php @@ -220,7 +220,7 @@ class Security { return ''; } - srand((int)Configure::read('Security.cipherSeed')); + srand((int)(float)Configure::read('Security.cipherSeed')); $out = ''; $keyLength = strlen($key); for ($i = 0, $textLength = strlen($text); $i < $textLength; $i++) {