hCaptcha failed to initialize on link registration page #6909

Closed
opened 2025-11-02 07:10:50 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @qwertfisch on GitHub (Feb 21, 2021).

  • 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.

Originally created by @qwertfisch on GitHub (Feb 21, 2021). - Gitea version (or commit ref): 1.13.1 - Git version: irrelevant - Operating system: Linux <!-- Please include information on whether you built gitea yourself, used one of our downloads or are using some other package --> <!-- Please also tell us how you are running gitea, e.g. if it is being run from docker, a command-line, systemd etc. ---> <!-- If you are using a package or systemd tell us what distribution you are using --> - Database: - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] 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](https://user-images.githubusercontent.com/4212687/108640628-22f27500-749b-11eb-97a8-c65ac822311f.png) ### Registration fails Just trying to complete the registration of course fails: ![registration2](https://user-images.githubusercontent.com/4212687/108640635-2a198300-749b-11eb-8c5b-a8a3ee728263.png) ## 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.
GiteaMirror added the type/bug label 2025-11-02 07:10:50 -06:00
Author
Owner

@zeripath commented on GitHub (Feb 28, 2021):

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

@zeripath commented on GitHub (Feb 28, 2021): It would be helpful to tell us what the developer tools console says...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6909