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

Stops ParseResult.from_string from accepting ports not preceded by a ':' character #103

Merged
merged 4 commits into from May 21, 2023

Conversation

JohnJamesUtley
Copy link
Contributor

Fixes #102

@@ -51,7 +51,7 @@
(
"^(?:(?P<userinfo>{})@)?" # userinfo
"(?P<host>{})" # host
":?(?P<port>{})?$" # port
"(:(?P<port>{}))?$" # port
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be a non-capturing group on the outside as we don't need to capture :<port> as well as <port>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, good catch. Fixed it just now.

@sigmavirus24 sigmavirus24 merged commit 45377d7 into python-hyper:main May 21, 2023
9 of 10 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.

ParseResult.fromString accepts ports that aren't preceded by a ':' character
3 participants