DNS.txt lookup from DNS.jsm does not work with a record containing multiple strings
Categories
(MailNews Core :: General, defect)
Tracking
(Not tracked)
People
(Reporter: lieser2, Assigned: clokep)
References
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
Steps to reproduce:
Query "20161025._domainkey.accounts.google.com" using the DNS.jsm
var {DNS} = ChromeUtils.import("resource:///modules/DNS.jsm");
DNS.txt("20161025._domainkey.accounts.google.com").then(recs => {
alert(JSON.stringify(recs));
});
Actual results:
Data contains only the first string of the TXT record ("k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0tpaC4Pmt8s17GKpCAReTRa7bYtCoWous9B8w+vcMVVwZ5aum1QCztbJCU5Hi6iLrw+pT4fzoUeOJ1pqyD5cPuiQ4hswsGs14p6ztDfifKUrzc+AzUDYVeVltDcq0/b81F").
The second one is missing ("2nQLzxZl7S4peIk/5HPo+CzbC0DCdeBhHukVzTnId9uFe2GtMSgR1LCF8OY+h7SZOY59GiYaQ9MOSVKNGe3OD0UeYOluopWhdgthH+QnYoPV2oI0isVdCWgg2WnNm+Jq8gNFOMZILh01JcixDKiEDLC2Eh9Y+cZccXplCQ/EYljJ7jBIh7jxICXRWYb5ZD9NMZXFdrS7pJ5ICOOnK73QIDAQAB").
Expected results:
Both strings should be included in the result. If directly concatenated together by the DNS.jsm module or as an array does not matter to me.
Comment 1•5 years ago
|
||
We moved to DNS.jsm in bug 1349337 in TB 70. Are you sure you're reporting this for TB 60? I guess you mean TB 70. I'll NI Paul and Magnus.
Comment 2•5 years ago
|
||
All I get on linux is bug 1571076, so I don't know. The module was there since a long time.
Comment 3•5 years ago
|
||
I searched for .txt(
and don't see any instances of its use in our code base, so it wouldn't be surprising if there are bugs with this unused method/code path. The DNS.jsm module was in TB 68, but at that point it was only used by the chat code.
plieser, what are you trying to do? Are you working on an add-on or something?
Comment 4•5 years ago
|
||
Philippe Lieser is the author of https://addons.thunderbird.net/en-GB/thunderbird/addon/dkim-verifier/
Are you sure you're reporting this for TB 60? I guess you mean TB 70.
Tried it also out not just with TB 71, but also in TB 60.9.0 (both on Windows). For me the module is available in both.
plieser, what are you trying to do? Are you working on an add-on or something?
Like Jörg already mentioned, I'm the author of the DKIM Verifier add-on. For that I need to get the DKIM keys stored as TXT records in DNS. The keys are often longer than just one String.
Currently I ship a DNS resolver written in JS with the add-on itself, and use it as default (https://github.com/lieser/dkim_verifier/blob/master/modules/JSDNS.jsm). I also have something similar like the DNS.jsm module, using ctypes and a native library, but with libunbound as the underlying library (to support DNSSEC).
Found this module yesterday, and was thinking that it would be nice if I could use it in the future, instead of shipping my own library for it. Especially if I will hofully find time to start porting the add-on to a WebExtension in the future. That Is why I also filled bug 1530122.
Note that this is currently not very important to me. More a nice to have.
What would also be nice is if the module could report more detailed error information, instead of just -1. As it can happen that DKIM keys are getting deleted, it is good to be able to distinguish between a nonextisting domain, and an actual error.
Updated•2 years ago
|
Assignee | ||
Comment 6•23 days ago
|
||
Confirmed duplicate of bug 1571076.
Assignee | ||
Comment 7•23 days ago
|
||
Spoke more with plieser about this and it is not a duplicate. That bug is about multiple records, this is about multiple strings in a single record.
dig 20230601._domainkey.google.com TXT
is an example of this:
20230601._domainkey.google.com. 3600 IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4zd3nfUoLHWFbfoPZzAb8bvjsFIIFsNypweLuPe4M+vAP1YxObFxRnpvLYz7Z+bORKLber5aGmgFF9iaufsH1z0+aw8Qex7uDaafzWoJOM/6lAS5iI0JggZiUkqNpRQLL7H6E7HcvOMC61nJcO4r0PwLDZKwEaCs8gUHiqRn/SS3wqEZX29v/VOUVcI4BjaOz" "OCLaz7V8Bkwmj4Rqq4kaLQQrbfpjas1naScHTAmzULj0Rdp+L1vVyGitm+dd460PcTIG3Pn+FYrgQQo2fvnTcGiFFuMa8cpxgfH3rJztf1YFehLWwJWgeXTriuIyuxUabGdRQu7vh7GrObTsHmIHwIDAQAB"
Thunderbird doesn't get this right and truncates it after the first string.
Assignee | ||
Updated•19 days ago
|
Assignee | ||
Comment 8•19 days ago
|
||
Depends on D209966
Description
•