Author serhiy.storchaka
Recipients barry, jader.fabiano, r.david.murray, serhiy.storchaka, tshepang
Date 2014-08-01.19:55:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1406922931.12.0.296278221792.issue21448@psf.upfronthosting.co.za>
In-reply-to
Content
Therefore the bug is that email parser is dramatically slow for abnormal long lines. It has quadratic complexity from line size. Minimal example:

import email.parser
import time
data = 'From: example@example.com\n\n' + 'x' * 10000000
start = time.time()
email.parser.Parser().parsestr(data)
print(time.time() - start)
History
Date User Action Args
2014-08-01 19:55:31serhiy.storchakasetrecipients: + serhiy.storchaka, barry, r.david.murray, tshepang, jader.fabiano
2014-08-01 19:55:31serhiy.storchakasetmessageid: <1406922931.12.0.296278221792.issue21448@psf.upfronthosting.co.za>
2014-08-01 19:55:31serhiy.storchakalinkissue21448 messages
2014-08-01 19:55:31serhiy.storchakacreate