-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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-30988: Add InvalidHeaderDefect for Trailing Periods #18687
Conversation
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
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). Recognized GitHub usernameWe couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames: This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
Codecov Report
@@ Coverage Diff @@
## master #18687 +/- ##
===========================================
+ Coverage 82.12% 83.21% +1.08%
===========================================
Files 1956 1571 -385
Lines 589830 415188 -174642
Branches 44477 44480 +3
===========================================
- Hits 484427 345506 -138921
+ Misses 95752 60035 -35717
+ Partials 9651 9647 -4
Continue to review full report at Codecov.
|
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.
Looking through bug tracker, it appears that 30988 should be the bug referenced in the eml_parser. |
Duplicate of #15600 |
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 was only checked with Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53).
https://bugs.python.org/issue27257