mirror of
https://github.com/go-gitea/gitea.git
synced 2026-12-03 21:32:25 -06:00
The two 2FA login forms relied on the deprecated `RenderWithErrDeprecated` path, which re-rendered the whole page on a wrong code and made the submit button send a duplicate request on a second click. Migrate both forms to `form-fetch-action` and return JSON errors from the handlers, so the framework's built-in in-flight guard blocks duplicate submissions and errors are shown as toasts. Fixes: https://github.com/go-gitea/gitea/issues/27427 Assisted-by: OpenCode:hy4-flash-free --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>