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