Closed Bug 1722294 Opened 4 years ago Closed 3 years ago

Wrong DNS records looked up during CardDAV address book setup

Categories

(MailNews Core :: Address Book, defect)

Thunderbird 91
defect

Tracking

(thunderbird_esr91+ fixed, thunderbird92 fixed)

RESOLVED FIXED
93 Branch
Tracking Status
thunderbird_esr91 + fixed
thunderbird92 --- fixed

People

(Reporter: dpa-mozilla, Assigned: darktrojan)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0

Steps to reproduce:

With TB91b2 I delete ~/.thunderbird and ~/.cache/thunderbird , start TB and provide for the setup an email address aaa@aegee.org with password abc.

Actual results:

Thunderbird does fetch from DNS the record SRV _caldavs._tcp.aegee.org → cal.aegee.org and then calls PROPFIND https://cal.aegee.org/.well-known/carddav . When I tested it, the address https://cal.aegee.org/.well-known/carddav had not existed, so the setup failed.

Expected results:

TB should have fetched from DNS SRV _caldavs._tcp.aegee.org → path='/dav/addressbooks' and called PROPFIND https://cal.aegee.org/dav/addressbooks . This is implied by RFC 6764.

Flags: needinfo?(geoff)
Summary: DNS TXT records ignored during Addressbook account setup → DNS TXT records ignored during Addressbook account setup (CalDAV/CardDAV)

Correction: I wrote _caldavs._tcp but I meant _carddavs._tcp .

Hmm, there is no SRV record for the address book. Try this in the console:

var { DNS } = ChromeUtils.import("resource:///modules/DNS.jsm");
var hostname = "aegee.org";
var recs = await DNS.srv(`_carddavs._tcp.${hostname}`); recs;

The SRV record is just one item, which is for caldav.

var txts = await DNS.txt(`_carddavs._tcp.cal.aegee.org`); txts;

Gives no results

var txts = await DNS.txt(`_carddavs._tcp.aegee.org`); txts;

.. does give back an array, and array[0] object data: "path=/dav/addressbooks"

But, we looked at the DNS TXT for the calendar, not the address book
https://searchfox.org/comm-central/rev/93487d295e3d3365c3082104ea980c7a0dfceeef/mailnews/addrbook/modules/CardDAVUtils.jsm#287

Not sure if there's a bug here. Shouldn't we get back the carddav SRV record to begin with?

These records exist:

_carddavs._tcp.aegee.org. 14400 IN TXT "path=/dav/addressbooks"
_carddavs._tcp.aegee.org. 7006 IN SRV 0 1 444 cal.aegee.org.

The lookup for _carddavs._tcp.cal.aegee.org, cited above, is wrong. So the bootstrap URL per RFC 6764 is https://cal.aegee.org:444/dav/addressbooks . TB91 does not use this bootstrap URL.

This ticket is only about CardDAV.

Summary: DNS TXT records ignored during Addressbook account setup (CalDAV/CardDAV) → DNS TXT records ignored during Addressbook account setup (CardDAV)

Yes, we're looking for TXT records on the wrong domain.

Assignee: nobody → geoff
Status: UNCONFIRMED → ASSIGNED
Component: Account Manager → Address Book
Ever confirmed: true
Flags: needinfo?(geoff)
Product: Thunderbird → MailNews Core
Summary: DNS TXT records ignored during Addressbook account setup (CardDAV) → Wrong DNS records looked up during CardDAV address book setup

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/bb44c6d49892
Look for TXT records on the right domain during CardDAV set-up. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch

Comment on attachment 9236743 [details]
Bug 1722294 - Look for TXT records on the right domain during CardDAV set-up. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #): never worked
User impact if declined: address book auto-detection may fail, because it's looking in the wrong place
Testing completed (on c-c, etc.): on c-c since last week, although there's been no Linux/Windows nightlies since then
Risk to taking this patch (and alternatives if risky): it wouldn't be broken any worse than it is already

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

Comment on attachment 9236743 [details]
Bug 1722294 - Look for TXT records on the right domain during CardDAV set-up. r=mkmelin

[Triage Comment]
Approved for beta

Attachment #9236743 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9236743 [details]
Bug 1722294 - Look for TXT records on the right domain during CardDAV set-up. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #): never worked
User impact if declined: address book auto-detection may fail, because it's looking in the wrong place
Testing completed (on c-c, etc.): in 92.0b3
Risk to taking this patch (and alternatives if risky): it wouldn't be broken any worse than it is already

Attachment #9236743 - Flags: approval-comm-esr91?

Comment on attachment 9236743 [details]
Bug 1722294 - Look for TXT records on the right domain during CardDAV set-up. r=mkmelin

[Triage Comment]
Approved for esr91

Attachment #9236743 - Flags: approval-comm-esr91? → approval-comm-esr91+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: