element-hq / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://element-hq.github.io/dendrite/
GNU Affero General Public License v3.0
33 stars 5 forks source link

Captcha is non-functional #3387

Open matrixbot opened 2 weeks ago

matrixbot commented 2 weeks ago

This issue was originally created by @RDS5 at https://github.com/matrix-org/dendrite/issues/3387.

Background information

Dendrite 0.13.7+46902e5 with Postgres database running on Debian 12 compiled with go 1.22.1

Description

Seemingly any hCaptcha (or even reCaptcha, as seen on matrix's official dendrite instance) will give "invalid key type" errors when users attempt to sign up.

Reproducing this is pretty easy, since matrix themselves have already reproduced it. image

matrixbot commented 2 weeks ago

This comment was originally posted by @Zorg64 at https://github.com/matrix-org/dendrite/issues/3387#issuecomment-2179483458.

I also cannot get hcaptcha to work, I get the same error. I was able to get recaptcha to work but would prefer hcaptcha.

For recaptcha, I selected V2 as well as the "I am not a robot" option. In the site settings disable (uncheck) "Verify the origin of reCAPTCHA solutions"

matrixbot commented 2 weeks ago

This comment was originally posted by @DevSH01 at https://github.com/matrix-org/dendrite/issues/3387#issuecomment-2258146276.

Having similar problem here with Hcaptcha, for some reason, its showing up as google Recaptcha instead of Hcaptcha

matrixbot commented 2 weeks ago

This comment was originally posted by @BVollmerhaus at https://github.com/matrix-org/dendrite/issues/3387#issuecomment-2264777264.

I'm relatively sure this is a problem with Element rather than Dendrite. The current Matrix specification does not accommodate captcha providers other than Google, so Element – and presumably most other clients – always use reCAPTCHA's URL, even if Dendrite advertises a different one (although I haven't confirmed that it actually does that correctly).

The necessary specification change is tracked at https://github.com/matrix-org/matrix-spec/issues/295.