Closed
Bug 227873
Opened 21 years ago
Closed 19 years ago
semicolons in vcard fields
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Andree, Assigned: ataylor)
References
Details
Attachments
(1 file, 2 obsolete files)
720 bytes,
patch
|
Bienvenu
:
review+
mscott
:
superreview+
asa
:
approval-aviary1.1a2+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031110 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031110 Adding a semicolon to fields in the vCard have the following consequences ("it" is referring to the semicolon): Title field: Replaces anything before semicolon with whatever is after it Department field: Erases whatever was written after it, and including itself Organization field: Replaces the Department field with whatever was written after it Address field 1: Places whatever was written after it in the City field, and pushes all other fields (up to the Web Page field) in front of it. Address field 2: See Address field 1 City field: Similar behavior as Address field, but moves whatever is after it to the next field and keeps pushing. State/Province field: Same behavior as City field Zip/Postal field: Same behavior as above Country: Removes whatever is written after it Did not check any other fields, but I guess semicolons are used as field separators or something. Reproducible: Always Steps to Reproduce: 1. Open the vcard dialogue 2. Enter something in fields as described above 3. Save vcard, and open the dialogue again... Actual Results: See details above, i.e., fields get reorganized and semicolons disappear. Expected Results: Should have saved semicolons as part of the text field and kept fields intact as entered. Since semicolons are field delimiters for vcards, perhaps they should be escaped when stored...
Comment 1•21 years ago
|
||
According to RFC2426 §2.4.2, semicolons must be escaped.
Blocks: 29106
Status: UNCONFIRMED → NEW
Component: Mail Window Front End → Mail Back End
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Comment 2•21 years ago
|
||
to quote from the RFC: In addition, any COMMA character (ASCII decimal 44), SEMI-COLON character (ASCII decimal 59) and COLON character (ASCII decimal 58) MUST be escaped with the BACKSLASH character (ASCII decimal 92). so this will go beyond just the semi's.
Assignee | ||
Comment 3•20 years ago
|
||
Here is a simple patch to the vcard parser that allows semi-colons, colons, and commas to be escaped with a backslash.
Assignee: sspitzer → ataylor
Status: NEW → ASSIGNED
Assignee | ||
Updated•20 years ago
|
Flags: blocking1.8a?
Updated•20 years ago
|
Flags: blocking1.8a? → blocking1.8a-
Comment 4•20 years ago
|
||
example of an incorrect VCard (from Netscape 4.72 !!!) : begin:vcard n:De Wit;Luc tel;work:+32 3 123 4567 x-mozilla-html:FALSE adr:;;;;;; version:2.1 email;internet:someone@somewhere.com x-mozilla-cpt:;-10720 fn:Someone end:vcard the 'version:2.1' was displayed inside the second address-line.
Comment 5•20 years ago
|
||
Comment on attachment 145638 [details] [diff] [review] Escape semi-colons, colons, and commas preceded with a backslash so we're supposed to treat all other \x as \x and not x? And \\ is supposed to be \\? If so, then this looks OK.
Attachment #145638 -
Flags: review+
Assignee | ||
Comment 6•20 years ago
|
||
Oops, the RFC does specify \\ represents \, plus it also says \n represents a newline. Here is an updated patch that also handles \\ and \n escapes.
Assignee | ||
Updated•20 years ago
|
Attachment #145638 -
Attachment is obsolete: true
Comment 7•20 years ago
|
||
Comment on attachment 159000 [details] [diff] [review] Escape backslashes, semi-colons, colons, and commas preceded with a backslash and expand \n newlines need to handle \N as well, according to the RFC, so it can just be else if (a == 'n' || (a == 'N') - r=bienvenu with that change.
Attachment #159000 -
Flags: review?(bienvenu)
Assignee | ||
Comment 8•20 years ago
|
||
Updated patch to handle \N.
Attachment #159000 -
Attachment is obsolete: true
Updated•20 years ago
|
Attachment #159001 -
Flags: superreview?(mscott)
Attachment #159001 -
Flags: review+
Comment 9•20 years ago
|
||
Do we actually write vcards with embedded semicolons correctly?
Assignee | ||
Comment 10•20 years ago
|
||
I just tested vCard output, and semicolons are not escaped there.
Updated•20 years ago
|
Attachment #159001 -
Flags: superreview?(mscott) → superreview+
Comment 11•20 years ago
|
||
What's the state of this reviewed patch here? Does it need re-working or does it just need to be checked in?
Assignee | ||
Comment 12•20 years ago
|
||
It has a review/superreview, so it's ready to go. Someone with CVS access needs to check it in.
Updated•20 years ago
|
Product: MailNews → Core
Comment 13•19 years ago
|
||
Andrew, when a bug ony needs a check-in, you should push, and bug the people with the rights to do it so that it happens. Now, the tree is frozen so it won't happen, and I don't know if it will be considered important enough to get a chance before 1.9, you missed a large window of opportunities since the SR time.
Comment 14•19 years ago
|
||
Comment on attachment 159001 [details] [diff] [review] Backslash escape patch v3 - handle \N as well as \n I just noticed this ancient patch that has r/sr.
Attachment #159001 -
Flags: approval-aviary1.1a2?
Updated•19 years ago
|
Attachment #159001 -
Flags: approval-aviary1.1a2? → approval-aviary1.1a2+
Comment 15•19 years ago
|
||
thanks for the patch Andrew.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 16•19 years ago
|
||
Shouldn't a follow-up bug be filled on comment #10? If I understand the comments well, now we read the vcard correctly, but we don't write them correctly (; not escaped) - shouldn't this be fixed? Andrew did I get your comment right?
Updated•17 years ago
|
Attachment #159000 -
Flags: review?(bienvenu)
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•