1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-09-30 19:22:08 +00:00
forgejo/modules/validation
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
..
binding.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
binding_test.go Validate OAuth Redirect URIs (#32643) 2024-12-03 10:19:22 +01:00
email.go [v12.0/forgejo] fix: email comments are removed from email addresses (#9083) 2025-08-30 18:45:30 +02:00
email_test.go [v12.0/forgejo] fix: email comments are removed from email addresses (#9083) 2025-08-30 18:45:30 +02:00
glob_pattern_test.go [CHORE] Use forked binding library 2024-11-05 22:47:34 +01:00
helpers.go fix: allow instance API URLs in release assets (#7644) 2025-06-09 10:01:59 +02:00
helpers_test.go chore: QoL improvements to tests (#7917) 2025-05-21 15:45:56 +02:00
refname_test.go [CHORE] Use forked binding library 2024-11-05 22:47:34 +01:00
regex_pattern_test.go [CHORE] Use forked binding library 2024-11-05 22:47:34 +01:00
validatable.go enhance validateable interface (#7714) 2025-05-30 13:07:35 +02:00
validatable_test.go enhance validateable interface (#7714) 2025-05-30 13:07:35 +02:00
validurl_test.go [CHORE] Use forked binding library 2024-11-05 22:47:34 +01:00
validurllist_test.go Validate OAuth Redirect URIs (#32643) 2024-12-03 10:19:22 +01:00