From ac41c163e3f2f077c140c391577035aee475e8b7 Mon Sep 17 00:00:00 2001 From: manu_grh Date: Thu, 11 Jun 2020 20:59:50 +0530 Subject: [PATCH] Changing the exception type Throw the CryptographicException if signature verification failed --- .../LegacyFormsAuthenticationTicketEncryptor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AspNetCore.LegacyAuthCookieCompat/LegacyFormsAuthenticationTicketEncryptor.cs b/src/AspNetCore.LegacyAuthCookieCompat/LegacyFormsAuthenticationTicketEncryptor.cs index dfe761f..23f58f1 100644 --- a/src/AspNetCore.LegacyAuthCookieCompat/LegacyFormsAuthenticationTicketEncryptor.cs +++ b/src/AspNetCore.LegacyAuthCookieCompat/LegacyFormsAuthenticationTicketEncryptor.cs @@ -180,7 +180,7 @@ private byte[] Decrypt(byte[] cookieBlob, HashProvider hasher, bool isHashAppend if (cookieBlob == null) { // signature verification failed - throw new Exception("Signature verification failed"); + throw new CryptographicException("Signature verification failed"); } }