aa
This commit is contained in:
@@ -94,8 +94,8 @@ func callFunc(c *gin.Context, worker func() (retVal interface{}, errCode string,
|
||||
|
||||
func captchaVerify(c *gin.Context, code string) bool {
|
||||
session := sessions.Default(c)
|
||||
if captchaId := session.Get(c.ClientIP() + model.SessionKey); captchaId != nil {
|
||||
session.Delete(c.ClientIP() + model.SessionKey)
|
||||
if captchaId := session.Get(model.SessionKey); captchaId != nil {
|
||||
session.Delete(model.SessionKey)
|
||||
_ = session.Save()
|
||||
if captcha.VerifyString(captchaId.(string), code) {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user