Skip to content

Commit ac5e5ca

Browse files
author
AJ ONeal
committed
swap EnableCaptcha for RequireExternalRegistrationCaptcha for LinkedAccounts
1 parent 900e825 commit ac5e5ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routers/user/auth.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,13 +815,13 @@ func LinkAccountPostRegister(ctx *context.Context, cpt *captcha.Captcha, form au
815815
return
816816
}
817817

818-
if setting.Service.EnableCaptcha && setting.Service.CaptchaType == setting.ImageCaptcha && !cpt.VerifyReq(ctx.Req) {
818+
if setting.Service.RequireExternalRegistrationCaptcha && setting.Service.CaptchaType == setting.ImageCaptcha && !cpt.VerifyReq(ctx.Req) {
819819
ctx.Data["Err_Captcha"] = true
820820
ctx.RenderWithErr(ctx.Tr("form.captcha_incorrect"), tplLinkAccount, &form)
821821
return
822822
}
823823

824-
if setting.Service.EnableCaptcha && setting.Service.CaptchaType == setting.ReCaptcha {
824+
if setting.Service.RequireExternalRegistrationCaptcha && setting.Service.CaptchaType == setting.ReCaptcha {
825825
valid, _ := recaptcha.Verify(form.GRecaptchaResponse)
826826
if !valid {
827827
ctx.Data["Err_Captcha"] = true

0 commit comments

Comments
 (0)