mirror of
https://github.com/tiger1103/gfast.git
synced 2026-09-23 02:40:54 +00:00
captcha 修复
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"github.com/gogf/gf/frame/g"
|
||||
"github.com/gogf/gf/net/ghttp"
|
||||
"github.com/gogf/gf/os/gtime"
|
||||
"github.com/gogf/gf/text/gstr"
|
||||
"github.com/gogf/gf/util/gconv"
|
||||
"github.com/gogf/gf/util/gvalid"
|
||||
"github.com/mojocn/base64Captcha"
|
||||
@@ -67,6 +68,7 @@ func VerifyString(id, answer string) bool {
|
||||
driver := new(base64Captcha.DriverString)
|
||||
store := base64Captcha.DefaultMemStore
|
||||
c := base64Captcha.NewCaptcha(driver, store)
|
||||
answer = gstr.ToLower(answer)
|
||||
return c.Verify(id, answer, true)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user