mailman-2.1.20: option "subject_prefix": prefix trailing blanks are removed when subject lines have non-ASCII characters

Bug #1525954 reported by sphakka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Low
Mark Sapiro

Bug Description

Trailing blanks on option "subject_prefix" are removed on subject lines with non-ASCII characters. F.i., with options

  preferred_language = "Français"
  subject_prefix = "[prefix] "

(irrespective of encode_ascii_prefixes)

sending this (via Seamonkey Mail, LANG=en_US.UTF-8):

  Subject: "[prefix] c'est du français"

results in reception of:

  Subject: "[prefix]c'est du français"

Related branches

Revision history for this message
sphakka (sphakka) wrote :

Pardon me. This happens *only* when subject_prefix is also non-ASCII, e.g. "[préfixe] ".

Revision history for this message
Mark Sapiro (msapiro) wrote :

The issue is with RFC 2047 encoded Subject: and the fact that white space is insignificant between RFC 2047 "encoded words".

This fix adds a trailing space to the subject_prefix (from which it has been previously stripped) under what I think is just those circumstances where it is needed.

There is another issue in that under some circumstances, the prefix will be followed by two spaces. This is unchanged by this fix and I have no plan to try to change it. I think this only occurs when the prefix is ascii only and the incoming Subject: already contains the prefix, but doesn't contain a Re: indicator.

Changed in mailman:
assignee: nobody → Mark Sapiro (msapiro)
importance: Undecided → Low
milestone: none → 2.1.21
status: New → Fix Committed
Mark Sapiro (msapiro)
Changed in mailman:
milestone: 2.1.21 → 2.1.21rc1
status: Fix Committed → Fix Released
Revision history for this message
sphakka (sphakka) wrote :

I just gave it a try after reviewing my configuration. Since the patch applies only to subjects with "Re:", it doesn't work on the very first message. Wouldn't it be feasible in all circumstances?

Revision history for this message
Mark Sapiro (msapiro) wrote :

It's fairly complicated. I have a possible fix, but it will take me a while to test all combinations of ascii/non-ascii prefixes and subjects and old vs new style prefixes and subjects with and without Re: and prefix.

Changed in mailman:
milestone: 2.1.21rc1 → 2.1.24
status: Fix Released → In Progress
Revision history for this message
Mark Sapiro (msapiro) wrote :

Subject prefixing has been improved to always have a space between the prefix and the subject even with non-ascii in the prefix. This will sometimes result in two spaces when the prefix is non-ascii but the subject is ascii, but this is the lesser evil. (LP: #1525954)

Changed in mailman:
status: In Progress → Fix Committed
Mark Sapiro (msapiro)
Changed in mailman:
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.