We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3350b5 commit 16ba0e8Copy full SHA for 16ba0e8
core/utils/captcha/captcha.go
@@ -10,13 +10,12 @@ import (
10
var store = base64Captcha.DefaultMemStore
11
12
func VerifyCode(codeID string, code string) string {
13
- if codeID == "" {
14
- return "ErrCaptchaCode"
15
- }
16
vv := store.Get(codeID, true)
17
vv = strings.TrimSpace(vv)
18
code = strings.TrimSpace(code)
19
-
+ if codeID == "" || code == "" {
+ return "ErrCaptchaCode"
+ }
20
if strings.EqualFold(vv, code) {
21
return ""
22
}
0 commit comments