Created
January 5, 2023 19:09
-
-
Save borwickatuw/2ed085179708b821a0111cbeb5950df0 to your computer and use it in GitHub Desktop.
Workaround for _header_value_parser.py when the message ID has brackets in it
This file contains hidden or 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
| --- unpatched.py 2023-01-05 11:07:46.000000000 -0800 | |
| +++ email/_header_value_parser.py 2023-01-05 11:07:06.000000000 -0800 | |
| @@ -1485,6 +1485,8 @@ | |
| """ | |
| obs_local_part = ObsLocalPart() | |
| last_non_ws_was_dot = False | |
| + if len(value) >= 3 and value[0]=='[' and value[-2]==']': | |
| + value = value[1:-2] + value[-1] | |
| while value and (value[0]=='\\' or value[0] not in PHRASE_ENDS): | |
| if value[0] == '.': | |
| if last_non_ws_was_dot: |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For whatever reason, microsoft message-IDs tend to have brackets in them