[rt-users] subject quote problem

BÁLINT Bekény balint.bekeny at docca.hu
Thu Feb 11 12:54:28 EST 2010


Hi List,


I think there is a problem with mime-encoded header handling.
The following code (and comments) are in I18N.pm file (3.8.7):
-----
# It's legal for headers to contain mime-encoded commas and semicolons which
# should not be treated as address separators. (Encoding == quoting here)
#
# until this is fixed, we must escape any string containing a comma or
semicolon
# this is only a bandaid
# Some _other_ MUAs encode quotes _already_, and double quotes
# confuse us a lot, so only quote it if it isn't quoted
# already.
$enc_str = qq{"$enc_str"} if $enc_str =~ /[,;]/ and $enc_str !~ /^".*"$/;
-----
It is good for To, Cc and other fields because non-ascii, encoded names
before email
addresses can containt commas and semicolons, for example:
NonAscii, Name <foo at bar.com>
becomes
"NonAscii, Name" <foo at bar.com>
and that's why commas don't cause problems, but it's not good for subject.
If I have a non-ascii subject with comma or semicolon it will be quoted.
Non-ascii, subject
becomes
"Non-ascii, subject"
It's not good but tolerable. But if I have a long non-ascii subject, I will
get
a worse thing:
It is a very long non ascii subject with commas, in the header, it will be
encoded and multiline
becomes something like this:
"It is a very long non ascii subject with commas, in"" the header, it will
be encoded and multiline"
It's not good if you parse the subject, and may annoy your users.

I attached a patch that I use to avoid this problem. It's maybe useful but
maybe you have a better solution
or opinion about this problem. Please let me know if there is!


Thanks,
--
Bekeny
Docca OutSource IT Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20100211/cd18ceb3/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: subject_noquote.diff
Type: application/octet-stream
Size: 834 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20100211/cd18ceb3/attachment.obj>


More information about the rt-users mailing list