From f65efa69d7fc78a078b85477cc95001f17653c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=8E=E5=8D=97=E5=85=AC=E4=BA=A4?= Date: Mon, 7 Mar 2022 06:41:59 +0000 Subject: [PATCH] =?UTF-8?q?update=20Lazy.Captcha.Core/DefaultCaptcha.cs.?= =?UTF-8?q?=20=E4=B8=BA=E4=BA=86=E9=98=B2=E6=AD=A2=E8=A2=AB=E5=BE=AA?= =?UTF-8?q?=E7=8E=AF=E6=9A=B4=E5=8A=9B=E7=A0=B4=E8=A7=A3=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E5=BA=94=E8=AF=A5=E4=B8=8D=E7=AE=A1=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E6=98=AF=E5=90=A6=E6=AD=A3=E7=A1=AE=EF=BC=8C=E5=9D=87?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=AF=A5=E9=AA=8C=E8=AF=81=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E5=88=87=E6=8D=A2=E6=96=B0=E7=9A=84=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Lazy.Captcha.Core/DefaultCaptcha.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Lazy.Captcha.Core/DefaultCaptcha.cs b/Lazy.Captcha.Core/DefaultCaptcha.cs index c5a5e16..8ffaf69 100644 --- a/Lazy.Captcha.Core/DefaultCaptcha.cs +++ b/Lazy.Captcha.Core/DefaultCaptcha.cs @@ -1,4 +1,4 @@ -using Lazy.Captcha.Core.Generator.Code; +using Lazy.Captcha.Core.Generator.Code; using Lazy.Captcha.Core.Generator.Image; using Lazy.Captcha.Core.Storage; using Microsoft.Extensions.Options; @@ -39,10 +39,7 @@ namespace Lazy.Captcha.Core var val = _storage.Get(captchaId); var comparisonType = _options.CurrentValue.IgnoreCase ? StringComparison.CurrentCultureIgnoreCase : StringComparison.CurrentCulture; var result = string.Equals(val, code, comparisonType); - if (result) - { - _storage.Remove(captchaId); - } + _storage.Remove(captchaId); return result; } -- Gitee