From 302b1cc8f6cd8a186bb9d226ef77d04a45d61ad3 Mon Sep 17 00:00:00 2001 From: Dave M Date: Mon, 30 Oct 2023 15:27:49 +0000 Subject: [PATCH] - Fixed a typo --- src/Cookie.php | 2 ++ src/Exception/CookieInvalidSecureHashException.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Cookie.php b/src/Cookie.php index a489711..7af40ab 100644 --- a/src/Cookie.php +++ b/src/Cookie.php @@ -89,6 +89,8 @@ class Cookie { list($hash, $value) = explode('|', $_COOKIE[$key], 2); if (! $this->isSecure($hash, $value)) { + $this->delete($key); + throw new Exception\CookieInvalidSecureHashException("Invalid cookie hash value given."); } diff --git a/src/Exception/CookieInvalidSecureHashException.php b/src/Exception/CookieInvalidSecureHashException.php index 53187dd..6a63a4a 100644 --- a/src/Exception/CookieInvalidSecureHashException.php +++ b/src/Exception/CookieInvalidSecureHashException.php @@ -1,5 +1,5 @@