-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate recipient email addresses to prevent invalid ending characters #8020
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an additional (in)validity check for the domain part to UserInputEmailAddressParser
and add relevant tests to UserInputEmailAddressParserTest
.
Side note: This doesn't fix the underlying problem of us (indirectly) using Rfc822Tokenizer
which is a bad fit for the job. However, it does improve the current situation a little bit.
legacy/ui/legacy/src/main/java/com/fsck/k9/view/RecipientSelectView.java
Outdated
Show resolved
Hide resolved
legacy/ui/legacy/src/main/java/com/fsck/k9/view/RecipientSelectView.java
Outdated
Show resolved
Hide resolved
61a4b6e
to
ab5d639
Compare
@cketti |
legacy/ui/legacy/src/main/java/com/fsck/k9/view/RecipientSelectView.java
Outdated
Show resolved
Hide resolved
legacy/ui/legacy/src/main/java/com/fsck/k9/view/UserInputEmailAddressParser.kt
Outdated
Show resolved
Hide resolved
@cketti |
Thanks 👍 |
You're welcome. |
Fixes #7112
isValidEmail
method, ensuring that any email address ending with characters such as/
,?
,=
,+
,&
,^
,%
,$
,#
,!
,'
, and-
is correctly flagged as invalid. (I checked and all the special characters that led to the repeating of this bug scenario were just these.)