diff options
author | R David Murray <rdmurray@bitdance.com> | 2014-02-08 18:13:01 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2014-02-08 18:13:01 (GMT) |
commit | 01e46ee7e28f5f14ede2b7078cfd277199751dc3 (patch) | |
tree | ab1808c55105351d4bf0a8e794e9d7eb70139d45 /Lib/email | |
parent | ff9616bbf7ecbd55a7206dae28f06ef90f270566 (diff) | |
parent | 0400d33928e6b463db164836da670700f03edc5d (diff) | |
download | cpython-01e46ee7e28f5f14ede2b7078cfd277199751dc3.zip cpython-01e46ee7e28f5f14ede2b7078cfd277199751dc3.tar.gz cpython-01e46ee7e28f5f14ede2b7078cfd277199751dc3.tar.bz2 |
Merge: #16983: Apply postel's law to encoded words inside quoted strings.
Diffstat (limited to 'Lib/email')
-rw-r--r-- | Lib/email/_header_value_parser.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py index 0392379..04ab84c 100644 --- a/Lib/email/_header_value_parser.py +++ b/Lib/email/_header_value_parser.py @@ -1556,6 +1556,13 @@ def get_bare_quoted_string(value): while value and value[0] != '"': if value[0] in WSP: token, value = get_fws(value) + elif value[:2] == '=?': + try: + token, value = get_encoded_word(value) + bare_quoted_string.defects.append(errors.InvalidHeaderDefect( + "encoded word inside quoted string")) + except errors.HeaderParseError: + token, value = get_qcontent(value) else: token, value = get_qcontent(value) bare_quoted_string.append(token) |