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

Validation when adding a registry #2334

Closed
bradrydzewski opened this issue Feb 8, 2018 · 3 comments
Closed

Validation when adding a registry #2334

bradrydzewski opened this issue Feb 8, 2018 · 3 comments
Projects

Comments

@bradrydzewski
Copy link

bradrydzewski commented Feb 8, 2018

The add registry endpoint expects a hostname only and should reject any values with special characters such as slashes. Otherwise they cannot be deleted.

@shivamMg
Copy link

shivamMg commented Mar 6, 2018

@bradrydzewski There's a nice hostname validator in goa framework. Their validators do not come in a separate package though; so to use them we'll have to import entire goa package. If it seems superfluous we can implement it ourselves. They've linked the RFC they used for creating that regex: https://www.ietf.org/rfc/rfc1035.txt (Page 7).

@shivamMg
Copy link

Used IsHost validator from govalidator instead. The one in goa is just for <label> from the RFC, and not for <domain>. Regex for domain becomes pretty complex. Also an IP can also be a possible registry address.

@bradrydzewski
Copy link
Author

Merged into 0.9 release. Pending verification.

@harness harness locked and limited conversation to collaborators Jun 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants