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

ne_uri_parse fixes #138

Merged
merged 3 commits into from
Dec 4, 2023
Merged

ne_uri_parse fixes #138

merged 3 commits into from
Dec 4, 2023

Conversation

fasticc
Copy link
Contributor

@fasticc fasticc commented Dec 4, 2023

Found a problem that ne_uri_parse can't correctly process a uri that has query or fragment, but no path. In this case, query and fragment will be placed in host.
Also found that ne_uri_parse accepts an invalid uri that has two or more colons after host or has a port with non-digit characters.

Copy link
Owner

@notroj notroj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic PR and thank you for including test cases!

src/ne_uri.c Outdated Show resolved Hide resolved
…th query or fragment.

* test/uri-tests.c (parse): Add test cases.

RFC 3986 3.2:
The authority component is preceded by a double slash ("//") and is
terminated by the next slash ("/"), question mark ("?"), or number
sign ("#") character, or by the end of the URI.
…prevent excessive characters from being placed in host.
* test/uri-test.c (failparse): Add test cases.
@notroj
Copy link
Owner

notroj commented Dec 4, 2023

Brilliant. Thank you!

@notroj notroj merged commit 9fabd80 into notroj:master Dec 4, 2023
193 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants