Comment 73 for bug 369150

Revision history for this message
In , M-wada (m-wada) wrote :

(In reply to comment #65)
> Decoding every header entry is already done when reading the header lines
> and spliting them into keyword/value pairs
> (see MimeHeaders_write_all_headers() in mimehdrs.cpp).
> Parsing the mail addresses is done at a very different later step.
> It's not just like swapping two function calls to get decoding of the addreses
> done after parsing them.
> And I'm afraid those headers (addresses) are also used in other places,
> so just moving the decoding behind the parsing would break other parts.

If so, as I wrote in Comment #20, "escaping of non-escaped ',' in an atom just after decoding" is a sufficient solution for this bug.
But it makes same situation as correctly escaped ',' in an atom case, then escape character of '\' just before ',' will be displayed incorrectly.
This is already existing and independent problem, and this has to be resolved at same time.

RFC 2822 defines "specials" as follows.
> specials = "(" / ")" / ; Special characters used in
> "<" / ">" / ; other parts of the syntax
> "[" / "]" /
> ":" / ";" /
> "@" / "\" /
> "," / "." /
> DQUOTE
I think other specials than ',' should be escaped also after decoding of an atom.
Christian Eyrich, what do you think?