Closed Bug 107620 Opened 23 years ago Closed 22 years ago

Custom Hdr: Adding a header with ":" at end causes extra "undefined" item

Categories

(SeaMonkey :: MailNews: Message Display, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 153251
Future

People

(Reporter: laurel, Assigned: naving)

References

Details

Using cot29 commercial trunk build

If you add a custom header with a colon ":" at the end (which is easy for a user
to do if they're cutting and pasting a header name from a view|source window),
the custom header dialog shows the text as pasted "header:" but the criteria
dropdown will show the header with two entry lines "header:" and "undefined". 

We should not have the extra "undefined" line, and should also probably strip
the colon (4.x did).

1.  Search|Search Mail/News Messages or Edit|Message Filters|New.
2.  Select "Customize..." from the first criteria dropdown which should land you
in the custom header dialog.  Type a header name with a colon at the end and
click Add.  Note the list shows the header just as you typed it, with a colon.
3.  Click OK to the custom header dialog.
4.  Pull down the criteria dropdown and notice the added header is listed in two
lines: "header:" and "undefined".

Result:  header added incorrectly

Expected:  colon stripped and just one line/hdr entry added in criteria options.
QA Contact: esther → laurel
: is used as a special char here. I expect no headers to have : in their names.
low priority..

Target Milestone: --- → Future
adding jglick and robinf to cc list in case they need to document this for any
custom header write-ups
Keywords: 4xp
Agree with Laurel, the colon should be stripped and just one line/hdr entry 
added in criteria options.
still exists dec14 commercial trunk
Just some more info for the file... olga just experienced a manic custom header
problem when she added a custom header with square brackets.
*** Bug 155496 has been marked as a duplicate of this bug. ***
from a comment I added to 153251:

"the custom headers UI can't allow ":" in the custom headers. In fact, the
custom headers UI needs to do a lot more validation of the header specified by
the user, because if the user does enter an invalid header, the imap server will
likely complain when we try to fetch it. The custom header ui should ensure that
the header is a valid rfc822 msg header  (there's probably some function around
to do that). The imap code might also need to throw out invalid custom headers too."
*** Bug 165275 has been marked as a duplicate of this bug. ***
I failed to find this bug because it was not in the Filter component. Shouldn't
it be? The description for that component reads

"1. User interface and functionality problems with creating, editing, deleting,
using filters. "

which nicely fits this bug.

This bug is easy to run into if you do not realize that the ending ":" character
that all headers have can be excluded.
This has been fixed on trunk.

*** This bug has been marked as a duplicate of 153251 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
*** Bug 165470 has been marked as a duplicate of this bug. ***
marking verified as a duplicate
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.