Closed Bug 1771893 Opened 2 years ago Closed 2 years ago

More than one trailing newline in the street textarea corrupts the vCard

Categories

(Thunderbird :: Address Book, defect)

Thunderbird 102
defect

Tracking

(thunderbird102 fixed)

RESOLVED FIXED
103 Branch
Tracking Status
thunderbird102 --- fixed

People

(Reporter: u695164, Assigned: u695164)

References

(Blocks 2 open bugs)

Details

(Keywords: dataloss)

Attachments

(1 file)

When applying two subsequent trailing newlines in the textarea for the street the vCard data corrupts with a Error creating vCard properties" (new ParserError("Invalid parameters in ';;;;'", (void 0)))

In the sqlite database the data looks like:

BEGIN:VCARD
N:;;;;
FN:
UID:81b3a35f-5a6c-4f83-8a61-d2353343769b
EMAIL:
ADR:;;w\n
;d;;;
END:VCARD

BEGIN:VCARD
N:dwa;awd;;;
ADR:;;foo\n
;foo\\n\n\n;;;
FN:awd dwa
UID:81b3a35f-5a6c-4f83-8a61-d2353343769b
NOTE:foo\n\n\n\n\nawd\n\n\n\n\n
END:VCARD

It is not possible to edit the vCard afterwards. (See Bug 1770146)

Keywords: dataloss

I've found and fixed a bug in ical.js that made this a problem.

Attachment #9278914 - Attachment description: Bug 1771893 - Trim newlines in the edit addressbook street field before setting it. r=#thunderbird-reviewers → Bug 1771893 - Trim newlines in the edit addressbook street field before setting it. r=darktrojan

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/cd75070b3fa6
Trim newlines in the edit addressbook street field before setting it. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

Comment on attachment 9278914 [details]
Bug 1771893 - Trim newlines in the edit addressbook street field before setting it. r=darktrojan

[Approval Request Comment]
User impact if declined: When editing a contact in the address book and a user sets two newlines at the end of the street the card will lose all vCard properties.
Testing completed (on c-c, etc.): on c-c
Risk to taking this patch (and alternatives if risky): low

Attachment #9278914 - Flags: approval-comm-beta?

Comment on attachment 9278914 [details]
Bug 1771893 - Trim newlines in the edit addressbook street field before setting it. r=darktrojan

[Triage Comment]
Approved for beta

Attachment #9278914 - Flags: approval-comm-beta? → approval-comm-beta+
Blocks: tb102found
Target Milestone: 102 Branch → 103 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: