Skip to content

Commit 5786aa4

Browse files
committed
fix encrpt
1 parent c9ce261 commit 5786aa4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Cookie/Middleware/EncryptCookies.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ protected function encrypt(Response $response)
142142
$response->headers->setCookie($this->duplicate(
143143
$cookie,
144144
$this->encrypter->encrypt(
145-
sha1($cookie->getName().'v2').'|'.$cookie->getValue(),
145+
hash_hmac('sha1', $cookie->getName().'v2', $this->encrypter->getKey()).'|'.$cookie->getValue(),
146146
static::serialized($cookie->getName())
147147
)
148148
));

0 commit comments

Comments
 (0)