mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
#14983: always add a line end after a MIME boundary marker.
This is more RFC compliant (see issue) and fixes a problem with signature verifiers rejecting the part when signed. There is some amount of backward compatibility concern here since it changes the output, but the RFC issue coupled with fixing the problem with signature verifiers seems worth the small risk of breaking code that depends on the current incorrect output.
This commit is contained in:
parent
409ea5dac1
commit
e9c31470e1
4 changed files with 16 additions and 7 deletions
|
|
@ -1711,7 +1711,8 @@ From: bperson@dom.ain
|
|||
|
||||
--BOUNDARY
|
||||
|
||||
--BOUNDARY--''')
|
||||
--BOUNDARY--
|
||||
''')
|
||||
|
||||
def test_no_parts_in_a_multipart_with_empty_epilogue(self):
|
||||
outer = MIMEBase('multipart', 'mixed')
|
||||
|
|
@ -1756,7 +1757,8 @@ MIME-Version: 1.0
|
|||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
hello world
|
||||
--BOUNDARY--''')
|
||||
--BOUNDARY--
|
||||
''')
|
||||
|
||||
def test_seq_parts_in_a_multipart_with_empty_preamble(self):
|
||||
eq = self.ndiffAssertEqual
|
||||
|
|
@ -1782,7 +1784,8 @@ MIME-Version: 1.0
|
|||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
hello world
|
||||
--BOUNDARY--''')
|
||||
--BOUNDARY--
|
||||
''')
|
||||
|
||||
|
||||
def test_seq_parts_in_a_multipart_with_none_preamble(self):
|
||||
|
|
@ -1808,7 +1811,8 @@ MIME-Version: 1.0
|
|||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
hello world
|
||||
--BOUNDARY--''')
|
||||
--BOUNDARY--
|
||||
''')
|
||||
|
||||
|
||||
def test_seq_parts_in_a_multipart_with_none_epilogue(self):
|
||||
|
|
@ -1834,7 +1838,8 @@ MIME-Version: 1.0
|
|||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
hello world
|
||||
--BOUNDARY--''')
|
||||
--BOUNDARY--
|
||||
''')
|
||||
|
||||
|
||||
def test_seq_parts_in_a_multipart_with_empty_epilogue(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue