mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +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
|
@ -299,9 +299,8 @@ class Generator:
|
|||
# body-part
|
||||
self._fp.write(body_part)
|
||||
# close-delimiter transport-padding
|
||||
self.write(self._NL + '--' + boundary + '--')
|
||||
self.write(self._NL + '--' + boundary + '--' + self._NL)
|
||||
if msg.epilogue is not None:
|
||||
self.write(self._NL)
|
||||
if self._mangle_from_:
|
||||
epilogue = fcre.sub('>From ', msg.epilogue)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue