From a4a9b27e5ac04b8623455097323341712e4e9793 Mon Sep 17 00:00:00 2001 From: Shikong <919411476@qq.com> Date: Tue, 25 Oct 2022 02:01:30 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- global/captcha.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/global/captcha.go b/global/captcha.go index aec6781..974fe3f 100644 --- a/global/captcha.go +++ b/global/captcha.go @@ -4,6 +4,7 @@ import ( "context" "github.com/go-redis/redis/v8" "github.com/mojocn/base64Captcha" + "strings" "time" ) @@ -44,6 +45,6 @@ func (c *CaptchaStore) Get(id string, clear bool) string { } func (c *CaptchaStore) Verify(id, answer string, clear bool) (match bool) { - match = c.Get(id, clear) == answer + match = strings.EqualFold(c.Get(id, clear), answer) return }