Qmail detector fails on non-ASCII messages

Bug #1074592 reported by Andrey Rahmatullin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Low
Mark Sapiro
flufl.bounce
Fix Released
Medium
Mark Sapiro

Bug Description

When the qmail detector is run on a message that contains non-ascii lines, it fails with

UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)

on the "line.startswith(introtag)" expression, as 'line' here is str with 8bit characters and 'introtag' is unicode (some literal from the 'introtags' list, which is unicode because of 'from __future__ import unicode_literals').

Related branches

Revision history for this message
Andrey Rahmatullin (wrar) wrote :

I've hacked that line to "if line.startswith(introtag.encode('latin1')):" and it seems to work.

Mark Sapiro (msapiro)
Changed in flufl.bounce:
assignee: nobody → Mark Sapiro (msapiro)
importance: Undecided → Medium
status: New → In Progress
Mark Sapiro (msapiro)
Changed in flufl.bounce:
milestone: none → 2.2
Mark Sapiro (msapiro)
Changed in flufl.bounce:
status: In Progress → Fix Committed
Mark Sapiro (msapiro)
Changed in mailman:
assignee: nobody → Mark Sapiro (msapiro)
Revision history for this message
Mark Sapiro (msapiro) wrote :

The Qmail detector didn't fail in MM 2.1, but I included the test case from flufl.bounce rev 36.

Changed in mailman:
importance: Undecided → Low
milestone: none → 2.1.16
status: New → Fix Committed
Barry Warsaw (barry)
Changed in flufl.bounce:
status: Fix Committed → Fix Released
Mark Sapiro (msapiro)
Changed in mailman:
milestone: 2.1.16 → 2.1.16rc1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.