Mailman.Mailbox.Mailbox.AppendMessage method can add null bytes to mailbox.

Bug #901957 reported by Mark Sapiro on 2011-12-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Low
Mark Sapiro

Bug Description

The Mailman.Mailbox.Mailbox.AppendMessage method has an invalid seek to position the file to the end of the mailbox. It contains

. # Seek to the last char of the mailbox
. self.fp.seek(1, 2)

This actually should be self.fp.seek(0, 2). There is no actual ill effect in Mailman itself from this bug as Mailman always opens mailbox files to be written to in 'a+' mode and seeks before writes are ignored for files opened in append mode, but if someone creates a process which opens a file in 'w+' mode and then uses the Mailman.Mailbox.Mailbox.AppendMessage method to add messages to it, each added message's UnixFrom is preceded by a null byte.

Mark Sapiro (msapiro) on 2011-12-13
Changed in mailman:
milestone: none → 2.1.15
status: Confirmed → Fix Committed
Mark Sapiro (msapiro) on 2012-06-15
Changed in mailman:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers