Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
31e984c3
Commit
31e984c3
authored
Oct 01, 2010
by
R. David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#10004: in Q encoded word ignore '=xx' when xx is not valid hex.
Bug report and fix by Thomas Guettler.
parent
9e88b5ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
Lib/email/quoprimime.py
Lib/email/quoprimime.py
+1
-1
Lib/email/test/test_email.py
Lib/email/test/test_email.py
+6
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/email/quoprimime.py
View file @
31e984c3
...
...
@@ -294,4 +294,4 @@ def header_decode(s):
the high level email.header class for that functionality.
"""
s
=
s
.
replace
(
'_'
,
' '
)
return
re
.
sub
(
r'=
\
w
{
2}'
,
_unquote_match
,
s
,
re
.
ASCII
)
return
re
.
sub
(
r'=
[a-fA-F0-9]
{2}'
,
_unquote_match
,
s
,
re
.
ASCII
)
Lib/email/test/test_email.py
View file @
31e984c3
...
...
@@ -1659,6 +1659,12 @@ Re: =?mac-iceland?q?r=8Aksm=9Arg=8Cs?= baz foo bar =?mac-iceland?q?r=8Aksm?=
dh
=
decode_header
(
s
%
q
)
self
.
assertEqual
(
dh
,
[(
a
,
'iso-8859-1'
)])
def
test_rfc2047_Q_invalid_digits
(
self
):
# issue 10004.
s
=
'=?iso-8659-1?Q?andr=e9=zz?='
self
.
assertEqual
(
decode_header
(
s
),
[(
b'andr
\
xe9
=zz'
,
'iso-8659-1'
)])
# Test the MIMEMessage class
class
TestMIMEMessage
(
TestEmailBase
):
...
...
Misc/NEWS
View file @
31e984c3
...
...
@@ -79,6 +79,9 @@ Core and Builtins
Library
-------
- Issue #10004: quoprimime no longer generates a traceback when confronted
with invalid characters after '=' in a Q-encoded word.
- Issue #1491: BaseHTTPServer nows send a 100 Continue response before sending
a 200 OK for the Expect: 100-continue request header.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment