mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
#12283: Fixed regression in smtplib quoting of leading dots in DATA.
I unfortunately introduced the regression when I refactored the code, and there were no tests of quoting so it wasn't caught. Now there is one.
This commit is contained in:
parent
8168d10ea6
commit
0f663d07e6
3 changed files with 18 additions and 1 deletions
|
@ -162,7 +162,7 @@ def quotedata(data):
|
|||
re.sub(r'(?:\r\n|\n|\r(?!\n))', CRLF, data))
|
||||
|
||||
def _quote_periods(bindata):
|
||||
return re.sub(br'(?m)^\.', '..', bindata)
|
||||
return re.sub(br'(?m)^\.', b'..', bindata)
|
||||
|
||||
def _fix_eols(data):
|
||||
return re.sub(r'(?:\r\n|\n|\r(?!\n))', CRLF, data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue