aa
This commit is contained in:
@@ -95,6 +95,7 @@ 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(model.SessionKey); captchaId != nil {
|
||||
globals.SugarLogger.Debugf("captchaVerify capid :%v", captchaId)
|
||||
session.Delete(model.SessionKey)
|
||||
_ = session.Save()
|
||||
if captcha.VerifyString(captchaId.(string), code) {
|
||||
@@ -103,6 +104,7 @@ func captchaVerify(c *gin.Context, code string) bool {
|
||||
return false
|
||||
}
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("captchaVerify2 capid :%v", captchaId)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user