-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
dnsPromises Resolver with IDN certain subdomains #39139
Comments
It might be introduced in #25679 |
It looks like a bug related to ICU:
Lines 598 to 671 in 3c09987
/cc @nodejs/i18n-api |
Can you repro with raw icu code or maybe https://icu4c-demos.unicode.org/icu-bin/idnbrowser ? If so please file an icu bug |
/cc @jasnell @TimothyGu since you both worked on this function. |
The label
This criterion essentially means that each label must be unambiguously LTR or RTL. Here, The reason for this rule to exist is captured in RFC 5893 § 3. But here's a simple explanation. Try to paste But if you try |
You might be able to enter the |
@TimothyGu 💯 for digging into this. Sounds right. @7c I think (correct me if I'm wrong) the xn- domain is valid DNS, but not valid IDN. @TimothyGu just to be pedantic, I think what you mean is that registrars should enforce this, and not allow registration of such a domain? Or that the DNS implementation should IDN-validate actual records? (At least with a warning) Everyone: I think this should be closed as not a bug, unless a regression test should be added to verify that an error is correctly thrown. |
@srl295 we have registered xn--ngbq.com as valid domain from a registrar, we could set it up at AWS route53 properly, it does indeed resolve properly through DNS system. How we detected this issue is; we do run tests with subdomains and we randomly take Date.now().$domain for test. We have seen that the tests fail on MACOS(node 14.latest) but do not fail on ubuntu (node 10.x). |
Yes, To use another analogy, $ dig 10000.xn--ngbq.com
10000.xn--ngbq.com. 172800 IN A …
@TimothyGu is correct about the spec, and it's actually a bug in Node 10.x and you should have received the error previously. I would recommend that in your test, you check: require('url').domainToASCII('10000.xn--ngbq.com') …and if it returns |
roger; yes it sounds like a bug in 10.x. I have tested 12.x and it also correctly fails... So this seems to be a <=10.x bug. You guys have at least a valid case for a test case where this error should be thrown. It is probably hard to find such edge cases but required for a project like nodejs |
Certain version does throw error:
with MacOS BigSur Darwin Kernel Version 20.5.0, node v14.15.4 but does work with node v10.15.3 (ubuntu) and v10.24.1 (ubuntu).
Code which does this unexpected behaviour:
for some reason, a valid IDN domain like xn--nqbg.com does with alphanumeric hosts but does not work with number subdomains at my bigsur mac with node v14.15.4, upgraded to v14.17.1 and it still fails
The text was updated successfully, but these errors were encountered: