Skip to content
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

Using wildcards while searching domain by name/nsLdhName idn (*xn--*) #55

Open
TheRedTrainer opened this issue Sep 18, 2017 · 4 comments

Comments

@TheRedTrainer
Copy link

Should the name and nsLdhName domain's searches including an idn and a wildcard be allowed? For example, if you execute the following searches:

example.com/rdap-server/domains?name=xn--
example.com/rdap-server/domains?nsLdhName=xn--

the server send a response. However, if you execute the following searches:

example.com/rdap-server/domains?name=xn--*
example.com/rdap-server/domains?nsLdhName=ns0.xn--.

the server answers: "400: Bad request".

@TheRedTrainer TheRedTrainer changed the title Using wildcards while searching by name and nsLdhName idn (*xn--*) Using wildcards while searching domain by name/nsLdhName idn (*xn--*) Sep 18, 2017
@pcarana
Copy link
Contributor

pcarana commented Sep 21, 2017

example.com/rdap-server/domains?name=xn--
example.com/rdap-server/domains?nsLdhName=xn--

the server send a response. However, ...

Just to clarify the description: there was a problem with the markdown, I believe that what you meant to describe was:

example.com/rdap-server/domains?name=*xn--*
example.com/rdap-server/domains?nsLdhName=*xn--*

Right?

@TheRedTrainer
Copy link
Author

That's right. My bad. I meant xn-- for name and nsLdhName.

@pcarana
Copy link
Contributor

pcarana commented Sep 22, 2017

No problem ;)

@pcarana pcarana added this to the v1.1.3 milestone Sep 26, 2017
@pcarana pcarana removed this from the v1.2.0 milestone Nov 7, 2017
@pcarana
Copy link
Contributor

pcarana commented Nov 7, 2017

This is a problem from a dependency inherited from rdap-core, specifically:

<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>58.2</version>

The issue is at com.ibm.icu.impl.UTS46 class that's used at mx.nic.rdap.core.db.DomainLabel. As seen in the source code of UTS46 class there's a comment: // "??--..." is Punycode or forbidden., which leads to the conclusion that any label that starts with "xn--" or any other thing like "ab--", "bc--", and so on, will be invalid due to this validation. Of course, if the label is validated using the functions provided by the IDNA_INSTANCE at DomainLabel class (the process of validation is made when the label transformed).

So far this issue is still present, no patch or fix has been made. Recommendations and help are welcomed.

Leaved as enhancement since it's out of scope for milestone 1.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants