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

Address string creation helpers should validate format #38

Open
m-ronnblom opened this issue Sep 23, 2021 · 0 comments
Open

Address string creation helpers should validate format #38

m-ronnblom opened this issue Sep 23, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@m-ronnblom
Copy link
Collaborator

Current xcm_addr_make_() functions for TCP/IP-based transports allow the application to pass an arbitrary string in the form of a purported DNS hostname. The size is limited as per DNS standards, but no other validation is performed.

XCM should validate that the resulting string of a xcm_addr_make_() call is a valid XCM address, and return an error (EINVAL) otherwise. The API already allows for this error, so you can argue this is a backward compatible change.

Also, the documentation should spell out if the "name" field in the struct xcm_addr_host struct may contain an IP address instead of a hostname (which should be allowed, for convenience), when it is passed to a xcm_addr_make_() function.

@m-ronnblom m-ronnblom added the enhancement New feature or request label Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant