forgejo-aneksajo/routers/web/auth
forgejo-backport-action 1bc42842ba [v12.0/forgejo] fix: email comments are removed from email addresses (#9083)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/9074

When registering with an email account including a comment (e.g. `me@example.com (a comment here)`), the comment is removed from the email address. It was possible to include an email address in the comment to bypass the block list. For instance if registering with `me@evilcorp.com (me@example.com)` the mail would incorrectly be verified against the block list using the comment instead of `@evilcorp.com`. This is a regression introduced in Forgejo v12.

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Security bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/9074): <!--number 9074 --><!--line 0 --><!--description ZW1haWwgY29tbWVudHMgYXJlIHJlbW92ZWQgZnJvbSBlbWFpbCBhZGRyZXNzZXM=-->email comments are removed from email addresses<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: famfo <famfo@famfo.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9083
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2025-08-30 18:45:30 +02:00
..
2fa.go [v12.0/forgejo] fix: consistently enforce 2FA on OpenID 2.0 (#9097) 2025-08-30 18:45:00 +02:00
auth.go [v12.0/forgejo] fix: email comments are removed from email addresses (#9083) 2025-08-30 18:45:30 +02:00
auth_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
linkaccount.go [v12.0/forgejo] fix: email comments are removed from email addresses (#9083) 2025-08-30 18:45:30 +02:00
main_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
oauth.go [v12.0/forgejo] fix: store code challenge correctly in session (#8682) 2025-07-26 15:17:04 +02:00
oauth_test.go fix: remove trailing slash from the issuer in oauth claims (#8028) 2025-06-10 20:46:17 +02:00
openid.go [v12.0/forgejo] fix: consistently enforce 2FA on OpenID 2.0 (#9097) 2025-08-30 18:45:00 +02:00
password.go chore(sec): unify usage of crypto/rand.Read (#7453) 2025-04-04 03:31:37 +00:00
webauthn.go [v12.0/forgejo] fix: consistently enforce 2FA on OpenID 2.0 (#9097) 2025-08-30 18:45:00 +02:00