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

Response code 501 on domain searches by name when zone isn't configured #48

Closed
pcarana opened this issue Aug 23, 2017 · 2 comments
Closed

Comments

@pcarana
Copy link
Contributor

pcarana commented Aug 23, 2017

This issue seems to be partially analized and fixed; right at mx.nic.rdap.server.servlet.DomainSearchServlet.getPartialSearch(String, RdapSearchRequest, DomainDAO) there's this block:

switch (request.getParameterName()) {
	case DOMAIN_NAME:
		if (!RdapConfiguration.hasZoneConfigured()) {
			// Is valid if there are no available zones, because the
			// rdap could only respond to autnum and ip networks
			// (RIR).
			throw new NotImplementedException();
		}

Fine, probably that's the case why the zones weren't configured, but what if they where intentionally not configured by other reasons, or they weren't configured just by mistake?

As I've understood, the server will return the 501 code when the configurator/user explicitly wants to, not by business validations (probably in some cases this is the best option). So, if the server "could only respond to autnum and ip networks" the most likely case is that the other servlets (domain(s), nameserver(s)) will be disabled at a higher level.

My proposal is that instead of returning "NotImplementedException" the function could return a "NotFoundException" (if possible, with a significative message), since the service actually could be implemented.

The same issue is at function getRegexSearch in the same class.

@pcarana pcarana added this to the v1.1.3 milestone Sep 22, 2017
@pcarana pcarana added the Solved label Sep 22, 2017
@pcarana
Copy link
Contributor Author

pcarana commented Oct 2, 2017

Well, the fix was made but it has been invalidated by commit ec56939 since the zones configuration has changed its logic and now depends mostly of the implementation.

@TheRedTrainer
Copy link

Verified. If a user searches a domain that is managed by a zone that is not configured in rdap-server (for example, domain.fr), the following error message is returned:

{"rdapConformance":["rdap_level_0"],"errorCode":"404","title":"Object not found","description":"Zone not found."}

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