1
1
mirror of https://github.com/go-gitea/gitea.git synced 2026-05-03 20:10:43 +02:00
Files
rootful 3d838ef96a Fix mCaptcha broken after Vite migration (#37492)
After the Webpack-to-Vite migration (#37002), mCaptcha stopped working
entirely on the registration page, throwing an error:

`TypeError: setting getter-only property "INPUT_NAME"`

This fix stops trying to mutate the read-only INPUT_NAME export. Instead
it probes for the Widget constructor at module.default (direct) or
module.default.default (CJS-wrapped), constructs the widget, and then
renames the hidden input element it creates to m-captcha-response which
is the field name Gitea's backend reads from the submitted form.

Generative AI was used to help with making this PR.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2026-05-02 17:21:56 +02:00
..
2026-02-22 08:01:43 +01:00
2025-03-31 01:53:48 -04:00
2026-04-20 23:57:08 +00:00
2025-06-24 15:49:31 +00:00