summaryrefslogtreecommitdiffstats
path: root/Lib/smtplib.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2011-06-09 19:05:57 (GMT)
committerR David Murray <rdmurray@bitdance.com>2011-06-09 19:05:57 (GMT)
commit0f663d07e669c39ce9a7ddfa71ed1293379a358e (patch)
tree10a53c305cd4812929a1519ae61e7aaa12798ff7 /Lib/smtplib.py
parent8168d10ea683d939ae52a1ed3d7c697c92bfae3d (diff)
downloadcpython-0f663d07e669c39ce9a7ddfa71ed1293379a358e.zip
cpython-0f663d07e669c39ce9a7ddfa71ed1293379a358e.tar.gz
cpython-0f663d07e669c39ce9a7ddfa71ed1293379a358e.tar.bz2
#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.
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-xLib/smtplib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index dbccf48..ce71699 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -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)