*** a/loader/lib/parser.py --- b/loader/lib/parser.py *************** *** 410,426 **** class ArchivesParser(object): raise IgnorableException("Failed to parse date '%s': %s" % (d, e)) # Workaround for broken quoting in some MUAs (see below) _re_mailworkaround = re.compile('"(=\?[^\?]+\?[QB]\?[^\?]+\?=)"', re.IGNORECASE) def _decode_mime_header(self, hdr, email_workaround): if hdr == None: return None ! # Per http://bugs.python.org/issue504152 (and lots of testing), it seems ! # we must get rid of the sequence \n\t at least in the header. If we ! # do this *before* doing any MIME decoding, we should be safe against ! # anybody *actually* putting that sequence in the header (since we ! # won't match the encoded contents) ! hdr = hdr.replace("\n\t","") # In at least some cases, at least gmail (and possibly other MUAs) # incorrectly put double quotes in the name/email field even when --- 410,427 ---- raise IgnorableException("Failed to parse date '%s': %s" % (d, e)) # Workaround for broken quoting in some MUAs (see below) + _re_unfold = re.compile(r'\n(?=[ \t])') _re_mailworkaround = re.compile('"(=\?[^\?]+\?[QB]\?[^\?]+\?=)"', re.IGNORECASE) def _decode_mime_header(self, hdr, email_workaround): if hdr == None: return None ! # Perform RFC 5322 header field unfolding. If we do this *before* ! # doing any MIME decoding, we should be safe against anybody ! # *actually* putting that sequence in the header (since we won't ! # match the encoded contents). Python's email package dubiously ! # declines to do this for us: http://bugs.python.org/issue504152 ! hdr = self._re_unfold.sub('', hdr) # In at least some cases, at least gmail (and possibly other MUAs) # incorrectly put double quotes in the name/email field even when