diff options
author | zeripath <art27@cantab.net> | 2021-02-28 22:04:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-28 17:04:15 -0500 |
commit | 030646eea41e17e58e11e73b19339630b6d6148e (patch) | |
tree | 32fda424cb136650dd89d1e52ac5e7b847f19dc1 /routers | |
parent | 83cf1a894e5a3a60ea72fa6b92744cb0705dd145 (diff) | |
download | gitea-030646eea41e17e58e11e73b19339630b6d6148e.tar.gz gitea-030646eea41e17e58e11e73b19339630b6d6148e.zip |
Set HCaptchaSiteKey on Link Account pages (#14834)
When using HCaptcha on link account pages the site key needs to be passed
in. This PR ensures that HCaptchaSiteKey is set in the data.
Fix #14766
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/user/auth.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/user/auth.go b/routers/user/auth.go index de74055d56..2d5e7bf449 100644 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -751,6 +751,7 @@ func LinkAccount(ctx *context.Context) { ctx.Data["CaptchaType"] = setting.Service.CaptchaType ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey + ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration ctx.Data["ShowRegistrationButton"] = false @@ -804,6 +805,7 @@ func LinkAccountPostSignIn(ctx *context.Context) { ctx.Data["Captcha"] = context.GetImageCaptcha() ctx.Data["CaptchaType"] = setting.Service.CaptchaType ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey + ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration ctx.Data["ShowRegistrationButton"] = false @@ -890,6 +892,7 @@ func LinkAccountPostRegister(ctx *context.Context) { ctx.Data["Captcha"] = context.GetImageCaptcha() ctx.Data["CaptchaType"] = setting.Service.CaptchaType ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey + ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration ctx.Data["ShowRegistrationButton"] = false |