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

Invalid port pattern is recognized in the sense of RFC3986 #45

Open
o314 opened this issue Aug 2, 2022 · 2 comments
Open

Invalid port pattern is recognized in the sense of RFC3986 #45

o314 opened this issue Aug 2, 2022 · 2 comments

Comments

@o314
Copy link
Contributor

o314 commented Aug 2, 2022

u = URI("//foo.com:bar")
using Test
@test u.port == "bar"

breaks the parsing of port as expected from https://www.ietf.org/rfc/rfc3986.html#section-3.2.3

The port subcomponent of authority is designated by an optional port
number in decimal following the host and delimited from it by a
single colon (":") character.

 port        = *DIGIT

The regex part is too broad @ https://github.com/JuliaWeb/URIs.jl/blob/master/src/URIs.jl#L94

@o314
Copy link
Contributor Author

o314 commented Aug 2, 2022

AKA rfc3986 / appendix b does not conform to rfc3986 / appendix A & section 3.2.3

@quinnj
Copy link
Member

quinnj commented Aug 28, 2022

Yeah, this would be good to fix.

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

No branches or pull requests

2 participants