From 5786aa4a388adfcc62862573275bd37d49aa07d7 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 27 Jul 2020 10:36:27 -0500 Subject: [PATCH] fix encrpt --- src/Illuminate/Cookie/Middleware/EncryptCookies.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Cookie/Middleware/EncryptCookies.php b/src/Illuminate/Cookie/Middleware/EncryptCookies.php index 835c4fd84536..22f9cea30216 100644 --- a/src/Illuminate/Cookie/Middleware/EncryptCookies.php +++ b/src/Illuminate/Cookie/Middleware/EncryptCookies.php @@ -142,7 +142,7 @@ protected function encrypt(Response $response) $response->headers->setCookie($this->duplicate( $cookie, $this->encrypter->encrypt( - sha1($cookie->getName().'v2').'|'.$cookie->getValue(), + hash_hmac('sha1', $cookie->getName().'v2', $this->encrypter->getKey()).'|'.$cookie->getValue(), static::serialized($cookie->getName()) ) ));