jojo/templates/user/auth
doasu a9bd068d00 fix: URL-encode login provider name in the href attribute (#10301)
The authentication provider's name (`$provider.DisplayName`) is not URL-encoded, so any illegal characters (e.g., '/') will be put in the link's href attribute verbatim.
For example, if the provider's name is `foo/bar` (valid name), the href attribute will point to `/user/oauth2/foo/bar` instead of `/user/oauth2/foo%2Fbar`, resulting in a "404 Not found" error.

This patch fixes this behaviour by URL-encoding the provider's DisplayName before appending it to the href attribute.

Signed-off-by: doasu <me@doasu.dev>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10301
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: doasu <me@doasu.dev>
Co-committed-by: doasu <me@doasu.dev>
2026-03-31 21:51:57 +02:00
..
activate.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
captcha.tmpl Defer captcha script loading (#33919) 2025-04-01 02:28:02 +02:00
change_passwd.tmpl Add main landmark to templates and adjust titles (#22670) 2023-02-01 22:56:10 +00:00
change_passwd_inner.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
finalize_openid.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
forgot_passwd.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
grant.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
grant_error.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
link_account.tmpl [UI] Fix inconsitencies in link/login account page 2024-08-09 10:52:17 +02:00
oauth_container.tmpl fix: URL-encode login provider name in the href attribute (#10301) 2026-03-31 21:51:57 +02:00
oidc_wellknown.tmpl chore: do not pass the full signing key to template (#10967) 2026-01-26 14:47:48 +01:00
prohibit_login.tmpl Move all login and account creation page labels to be above inputs (#29432) 2024-03-23 12:36:12 +01:00
reset_passwd.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
signin.tmpl Refactor login page (#31530) 2024-07-07 14:22:44 +05:00
signin_inner.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
signin_openid.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
signup.tmpl Refactor login page (#31530) 2024-07-07 14:22:44 +05:00
signup_inner.tmpl chore: refactor signup logic (#10915) 2026-01-26 22:55:30 +01:00
signup_openid_connect.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
signup_openid_navbar.tmpl [Port] gitea#29982 Introduce .secondary-nav and handle .page-content spacing universally 2024-03-28 16:43:09 +01:00
signup_openid_register.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
twofa.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
twofa_scratch.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
webauthn.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
webauthn_error.tmpl Migrate gt-hidden to tw-hidden (#30046) 2024-03-30 07:17:29 +01:00