Skip to content
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

bpo-27257: Add InvalidHeaderDefect for Trailing Periods #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

malvidin
Copy link
Owner

When an email header address field contains a period directly before the angle bracket, the default header policy raises an Attribute error, rather than adding a header defect.

This issue is referenced in the eml_parser as 27257, but I am not sure if this is the correct issue.
GOVCERT-LU/eml_parser#41

https://github.com/GOVCERT-LU/eml_parser/blob/f98980a77d9c7d914d97525a62294075c0ce42d9/tests/test_emlparser.py#L136

This fix was only checked with Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53).

When an email header address field contains a period directly before the angle bracket, the default header policy raises an Attribute error, rather than adding a header defect.

GOVCERT-LU/eml_parser#41
This change does not raise errors on leading or trailing dots on obsolete email headers. 
The previous modification in the get_phrase function only worked on the trailing dot issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant