-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
namesys: error when more than one IPFS-related DNSLink record exist #507
Comments
@hacdias since you've recently been looking into |
Triage notes: if this takes more than a few hours to do then it's P2. |
I think this might be easier than expected, and I also want to raise another issue. We check both
|
rootChan := make(chan AsyncResult, 1) | |
go workDomain(ctx, r, fqdn, rootChan) | |
subChan := make(chan AsyncResult, 1) | |
go workDomain(ctx, r, "_dnslink."+fqdn, subChan) |
The specification does not define DNSLink entries in the root domain. Should we remove this? This was likely done for some backwards compatibility before the DNSLink specification was created: https://dnslink.dev/
Duplicated entries for same namespace
Seems like we can just check here:
Lines 153 to 159 in a966a74
for _, t := range txt { | |
p, err := parseEntry(t) | |
if err == nil { | |
res <- AsyncResult{Path: p} | |
return | |
} | |
} |
It seems that, at the moment, we're just parsing the first TXT entry we find, no matter the namespace. It seems to me that if a domain had 3 DNSLink records for 3 different namespaces (valid), we'd only pick one and not even choose the one we support.
This brings another question: which namespace does Boxo prioritize? We support IPNS and IPFS. In case it has both, which do we choose?
Yes, this was legacy behavior which we REMOVED from the spec to push people towards publishing on We could remove support for legacy behavior, it is very old and may break someone's website, but should be an easy fix for them because we provide meaningful error now:
That being said, I would not change do this unless it makes fix for this issue easier.
In my mind, IPNS and IPFS values are equivalent, and having two should produce error. The desired behavior would be:
This way we allow non-ipfs records to coexist, but ensure there is only one for boxo/namesys user to act on. |
Ref. ipfs/distributions#1053
In cases like the above, we should not silently grab the first record, but instead,
dnslink=/ipfs/
ordnslink=/ipns/
)The text was updated successfully, but these errors were encountered: