Closed Bug 1777920 Opened 2 years ago Closed 2 years ago

Google CardDAV: additional backslash in text fields with colon

Categories

(Thunderbird :: Address Book, defect, P2)

Thunderbird 102

Tracking

(thunderbird_esr102 fixed)

RESOLVED FIXED
104 Branch
Tracking Status
thunderbird_esr102 --- fixed

People

(Reporter: ak.bugzilla, Assigned: darktrojan)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.66 Safari/537.36 Edg/103.0.1264.44

Steps to reproduce:

Add a text with a colon : to any text field (contact name, notes,...) for a contact in a Google CardDAV address book.

Actual results:

When the contact is synced with Google, it adds an additional backslash before the colon.

Expected results:

Remove the backslash.

This bug should be related to bug 1772677

Blocks: tb102found

TB103.0b2 on Linux.
I can confirm the problem as described above.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Already fixed :-)

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE

Pretty sure it's not fixed for all fields.

This is not fixed at all. Bug 1772677 only handles the URL field.
Since there was already a patch for this specific issue, I didn't want to broaden the scope of the original bug but filed a new one instead for the other fields.

Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
See Also: → 1772677

Iiuc, Geoff says that it's Google who broke this by doing extra escaping which then sails through to us.
The outcome must be quite frustrating for users of Thunderbird who may find lots of extra slashes / in their text fields - I think that might qualify for P2.
Also note that multiline fields are suspected to be affected by this, too (bug 1777543).

Severity: -- → S3
Status: REOPENED → NEW
Priority: -- → P2
See Also: → 1777543

I am looking at how best to mitigate this. It's not as easy as just taking out the characters, because we don't want to take them out if they're intentional, so we need to decide somehow (probably by checking if the card came from Google). Finding the right place in the code is complicated too.

Assignee: nobody → geoff
Status: NEW → ASSIGNED

Removes the extra escaping added to \r and : characters by Google server.

The removal happens as a card is read from the database, so no changes are permanent (unless the card is edited, in which case Google will put the escaping back again) and existing cards don't need fixing.
Because it's done at this point, none of the UI needs to be aware of it.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/3fc99a8e3246
Fix bad escaping of vCards by Google's CardDAV server. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/1db0a1d856b2
follow-up - Fix a broken test. rs=bustage-fix DONTBUILD

Comment on attachment 9285276 [details]
Bug 1777920 - Fix bad escaping of vCards by Google's CardDAV server. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined: Google contacts have unexpected characters in some fields
Testing completed (on c-c, etc.): In 104 b1
Risk to taking this patch (and alternatives if risky): Low

Attachment #9285276 - Flags: approval-comm-esr102?

Comment on attachment 9285276 [details]
Bug 1777920 - Fix bad escaping of vCards by Google's CardDAV server. r=mkmelin

[Triage Comment]
Approved for esr102

Attachment #9285276 - Flags: approval-comm-esr102? → approval-comm-esr102+

This will need an esr 102 patch - the "lazy" javascript stuff isn't on 102.

Flags: needinfo?(geoff)
Flags: needinfo?(geoff)
Attachment #9288413 - Flags: approval-comm-esr102+
Attachment #9288413 - Attachment description: 1777920-esr102.diff → 1777920-esr102.diff (includes follow-up)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: