[Mailman-Developers] Bug (missing sanity check) in parseaddr.py

fox_muld at quakenet.org fox_muld at quakenet.org
Mon Sep 8 06:22:47 EDT 2003


I'm sorry if this is a known bug, the buglist on sourceforge isn't exactly helpful, there is just too much in it and no adequate method for searching it; and google didn't find anything on this.
Recently one of our Mailinglists stopped working, and senddigests would die everytime it ran with this error:

Traceback (most recent call last):
  File "/home/mailman/cron/senddigests", line 94, in ?
    main()
  File "/home/mailman/cron/senddigests", line 86, in main
    mlist.send_digest_now()
  File "/home/mailman/Mailman/Digester.py", line 60, in send_digest_now
    ToDigest.send_digests(self, mboxfp)
  File "/home/mailman/Mailman/Handlers/ToDigest.py", line 130, in send_digests
    send_i18n_digests(mlist, mboxfp)
  File "/home/mailman/Mailman/Handlers/ToDigest.py", line 303, in send_i18n_digests
    msg = scrubber(mlist, msg)
  File "/home/mailman/Mailman/Handlers/Scrubber.py", line 162, in process
    dir = calculate_attachments_dir(mlist, msg, msgdata)
  File "/home/mailman/Mailman/Handlers/Scrubber.py", line 120, in
calculate_attachments_dir
    now = parsedate(datestr)
  File "/home/mailman/pythonlib/email/Utils.py", line 249, in parsedate
    return _parsedate(data)
  File "/home/mailman/pythonlib/email/_parseaddr.py", line 133, in parsedate
    t = parsedate_tz(data)
  File "/home/mailman/pythonlib/email/_parseaddr.py", line 126, in parsedate_tz
    tzoffset = tzsign * ( (tzoffset/100)*3600 + (tzoffset % 100)*60)
OverflowError: integer multiplication

It turned out to be caused by some invalid Date: header in a mail in digest.mbox (strange it was accepted, but then killed mailman everytime it tried to do something with it?). The header was:

Date: Tue, 26 Aug 2003 19:10:55 -119304547

That messed up timezone-offset obviously kills parseaddr. The obvious fix is to add some sanity check to that calculation, but as I don't speak python, I won't submit a patch for that.




More information about the Mailman-Developers mailing list