Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hCaptcha failed to initialize on link registration page #14766

Closed
2 of 6 tasks
qwertfisch opened this issue Feb 21, 2021 · 1 comment · Fixed by #14834
Closed
2 of 6 tasks

hCaptcha failed to initialize on link registration page #14766

qwertfisch opened this issue Feb 21, 2021 · 1 comment · Fixed by #14834
Labels
Milestone

Comments

@qwertfisch
Copy link

  • Gitea version (or commit ref): 1.13.1
  • Git version: irrelevant
  • Operating system: Linux
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No, because hCaptcha is not used in that Gitea instance

Description

Using hCaptcha as captcha type, for all new users to register an inline hCaptcha element is displayed and needs to be solved by the user. This works well on the standard register page (/user/sign_up).

When using a linked login, e.g. login through Github and then trying to link the Github account with a new Gitea user to be registered, the hCaptcha element is not loaded because it cannot be initialized. Trying to complete the registration therefore fails because of not solved captcha.

Screenshots

Login via external method

Before registration on Gitea, first login via Github. Then select Register new account on the resulting page to link a new Gitea account with Github (/user/link_account). The inline hCaptcha element cannot initialize:
registration1

Registration fails

Just trying to complete the registration of course fails:
registration2

Expectation

I expect the hCaptcha element to load on both pages, /user/sign_up and /user/link_account. The latter is a specific case to register just using an external login and create a linked Gitea account without password. Nonetheless it should also work with hCaptcha and use the same hCaptcha credentials / keys as on the standard registration page.

@zeripath
Copy link
Contributor

It would be helpful to tell us what the developer tools console says...

zeripath added a commit to zeripath/gitea that referenced this issue Feb 28, 2021
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 go-gitea#14766

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added this to the 1.13.3 milestone Feb 28, 2021
techknowlogick added a commit that referenced this issue Feb 28, 2021
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>
zeripath added a commit to zeripath/gitea that referenced this issue Mar 1, 2021
Backport go-gitea#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 go-gitea#14766

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
6543 pushed a commit that referenced this issue Mar 1, 2021
Backport #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>
@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants