Closed Bug 501978 Opened 15 years ago Closed 15 years ago

reply list broken for "List-Post: <mailto:foo@bar> (Comment)"

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b4

People

(Reporter: mkmelin, Assigned: mkmelin)

Details

Attachments

(2 files, 3 obsolete files)

Attached patch proposed fix (obsolete) — Splinter Review
Regressed with bug 496439.

If you have a header
List-Post: <mailto:foo@bar> (Post new message to the foo bar mailing list)

... the reply to list won't be enabled.
Attachment #386528 - Flags: review?(philringnalda)
Summary: reply list broken for → reply list broken for "List-Post: <mailto:foo@bar> (Comment)"
Isn't that just going to let you use reply to list to open a compose window without an address to send to? The point of the regex was that because compose uses an incorrect heuristic, only adding the list-post to the To field if (StringBeginsWith(listPost, NS_LITERAL_STRING("<mailto:")) && listPost.CharAt(listPost.Length() - 1) == '>'), we shouldn't be saying that you can reply-to-list when we're going to screw it up.
Ah yes :(
No longer blocks: 496439
Keywords: regression
Attachment #386528 - Attachment is obsolete: true
Attachment #386528 - Flags: review?(philringnalda)
Attached patch proposed fix, v2 (obsolete) — Splinter Review
Well this makes the backend work too. 
I'm not sure if it qualifies as the parser bug 496914 wants...
Attachment #386562 - Flags: superreview?(bugzilla)
Attachment #386562 - Flags: review?(philringnalda)
Attachment #386562 - Attachment description: proposed fix → proposed fix, v2
It might be good enough to go on with (I'd really love it if one of these bugs had an mbox attachment with a whole bunch of possible list-post headers, if not an actual test), but it's not the parser in question, since that would

* strip leading whitespace and comments, then if the first character isn't "<" discard the whole field

* strip comments (to not get fooled by one containing a comma), then

* split(",")

* if any chunk does not contain a <...>, discard it and any following it

* if any chunk contains anything but whitespace following the ">", discard it and any following chunks

Most of the things where you would find a list-post address you shouldn't would be just uninteresting spec-compliance failures like not knowing how to comment - the only "real" one I can think of offhand would be "NO (used to be <mailto:post@example.com> but we now treat that as a honeypot for our blackhole)".
Attached patch proposed fix, v3Splinter Review
bwinton pointed out the substring was wrong
Attachment #386562 - Attachment is obsolete: true
Attachment #386580 - Flags: superreview?(bugzilla)
Attachment #386580 - Flags: review?(philringnalda)
Attachment #386562 - Flags: superreview?(bugzilla)
Attachment #386562 - Flags: review?(philringnalda)
Attached file An mbox for philor. (obsolete) —
(In reply to comment #4)
> (I'd really love it if one of these bugs had an mbox attachment with a whole
> bunch of possible list-post headers, if not an actual test),

Okay, here's your mbox attachment.  It's got a couple of List-Post headers, ("NO", "address@foo.com", and "<mailto:address@foo.com>", which should cover this bug), and some weird To: headers, as well, if you wanted to use it in a different bug.

As a side note, all of these messages come from the wild.  Yes, even the "To: A Group:Chris Jones <c@a.test>,joe@where.test,John <jdoe@one.test>;"  :)

Later,
Blake.
Attached file A bit more testcasey
This isn't quite complete, but covers a few more things (and doesn't make me think about what's expected, always a plus in a testcase), including several we'll still fail on, none of which excite me quite enough to say we have to fix them here.
Attachment #393461 - Attachment is obsolete: true
Attachment #386580 - Flags: review?(philringnalda) → review+
Comment on attachment 386580 [details] [diff] [review]
proposed fix, v3

r=me, and somebody pretty please write a real parser before we touch this again!
Attachment #386580 - Flags: superreview?(bugzilla) → superreview+
changeset:   3336:bcf6c88c8d73
http://hg.mozilla.org/comm-central/rev/bcf6c88c8d73

->FIXED
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: Thunderbird 3.0b3 → Thunderbird 3.0b4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: