element-hq / element-hq/dendrite

hcaptcha fails with "Invalid site key"

Open
#2,878 9 comments 0 reactions 0 assignees View on GitHub
C-Client-API F-Registration O-Occasional S-Major T-Defect
Dominant language
Go
Stars
965
Forks
101
PR merge metrics
No merged PRs in 30d

Description

*This issue was originally created by [**@greenship24**](https://github.com/greenship24) at .*

### Background information

- **Dendrite version or git SHA**: Latest dendrite as of 2022-11-12
- **Monolith or Polylith?**:Monolith
- **SQLite3 or Postgres?**:postgres
- **Running in Docker?**:docker
- **`go version`**:built-in to image
- **Client used (if applicable)**: Element, schilidchat, element on the web, syphon, etc.

### Description

- **What** is the problem:
hcaptcha fails to work -
- **Who** is affected:
Anyone using hcaptcha in lieu of recaptcha
- **How** is this bug manifesting:
Response is "ERROR for site owner: Invalid site key" upon trying to register for the server
- **When** did this first appear:

### Steps to reproduce

- Place site key in the recaptcha_public_key
- Place private key in recaptcha_private_key
- Uncomment all fields under # To use hcaptcha.com..... and use the defaults (as in the dendrite.yaml template)

### Additional
I think it *might* have to do with whatever v2 and v3 recaptcha uses which I presume hcaptcha uses v3 now? Just a guess.
I've verified all settings and have done simple tests otherwise where the site key works fine.

Contributor guide

Open the contributing guide

Research direction

Start with the hCaptcha-related settings in the dendrite.yaml template and trace how recaptcha_public_key and recaptcha_private_key are used during registration. Reproduce the registration flow with the documented hCaptcha values and compare the generated widget configuration with hCaptcha's expectations; done means hCaptcha registration no longer reports an invalid site key.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.