Kaydet (Commit) f789ee4a authored tarafından Guido van Rossum's avatar Guido van Rossum

Avoid crashes with nested multipart/mixed parts.

üst 14d1c721
......@@ -367,7 +367,14 @@ def mimify_part(ifile, ofile, is_mime):
line = message_end
while multipart:
if line == multipart + '--\n':
return
# read bit after the end of the last part
while 1:
line = ifile.readline()
if not line:
return
if must_quote_body:
line = mime_encode(line, 0)
ofile.write(line)
if line == multipart + '\n':
nifile = File(ifile, multipart)
mimify_part(nifile, ofile, 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment