3 Nov 2009 07:28
2047 bug (with test), but I have no fix
Eric Gillespie <epg <at> pretzelnet.org>
2009-11-03 06:28:08 GMT
2009-11-03 06:28:08 GMT
This is the latest bogosity from Gmail. A guy configures his
from name as "Jim [ a guy ]" (actually it has non-Latin
characters, too, but that's not important for testing the bug)
and Gmail 2047-encodes that entire string, with no quotes.
repl doesn't like it:
repl: bad addresses:
Jim [ a guy ] <jim <at> example.com> -- missing mailbox ([ a guy ])
Of course it's invalid; it would need quotes. What I can't
figure out is where mh should add the quotes (not interested in
arguments over whether Gmail is sending out garbage; we lost that
war long ago).
It seems to me it has to be an optional feature of decode_2047,
because the FT_LS_DECODE handler in fmt_scan.c doesn't have
enough information. Since it can't parse the string, it can't
know where the quotes should go.
Thoughts?
Here's a simple test case to show the problem; plop it into
tests/repl/test-over2047 and it comes out like this:
0 test% ./runtest tests/repl/test-over2047
--- /tmp/nmh-test-koU16395/28487.expected 2009-11-02 22:19:39.000000000 -0800
+++ /tmp/nmh-test-koU16395/Mail/draft 2009-11-02 22:19:39.000000000 -0800
<at> <at> -1,4 +1,6 <at> <at>
-To: "Jim [ a guy ]" <jim <at> example.com>
+To:
(Continue reading)
RSS Feed