mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 17:41:57 +08:00
Test: captcha
This commit is contained in:
@@ -26,7 +26,6 @@ func (service *UserLoginService) Login(c *gin.Context) serializer.Response {
|
||||
// TODO 验证码校验
|
||||
captchaID := util.GetSession(c, "captchaID")
|
||||
if captchaID == nil || !base64Captcha.VerifyCaptcha(captchaID.(string), service.CaptchaCode) {
|
||||
util.DeleteSession(c, "captchaID")
|
||||
return serializer.ParamErr("验证码错误", nil)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user