-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require that parsed mail addresses match raw input
Python's email parser turns malformed addresses into valid ones by removing anything after and including the second '@'. This meant that sydent sent emails to the validated address but stored the raw address as validated. This rejects any requests where the parsed email address does not match the raw input.
- Loading branch information
Showing
1 changed file
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4e1cfff
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.
How is this a fix... as shown also here https://bugs.python.org/msg329463 ?
Following the Python RFC here you should check for parsedFrom == ('', '') and same for parsedTo == ('', '')
4e1cfff
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.
Don't you want to check mailFrom != parsedFrom and mailTo != parsedTo as stated in "This rejects any requests where the parsed email address does not match the raw input." ?
4e1cfff
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.
@myselfhimself 3103b65