Skip to content

Conversation

kenballus
Copy link

This isn't supposed to work:

import hyperlink
hyperlink.URL.from_text("http://example.com:-80")

This patch ensures that only valid port strings are accepted.

(The root cause of this is that port numbers are parsed using int. Both cpython and rfc3986 also had this bug.)

@kenballus kenballus changed the title Fix non-numeric port number bug Fix non-numeric port number bug (#180) Feb 7, 2023
@kenballus kenballus changed the title Fix non-numeric port number bug (#180) Fix non-numeric port number bug (addresses #180) Feb 7, 2023
@kenballus
Copy link
Author

Addresses #180

Copy link
Member

@mahmoud mahmoud left a comment

Choose a reason for hiding this comment

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

Nice work! Just one question/thought for now. Thanks for this!

…thon. changed an error message. fixed negative default port bug
Copy link
Member

@mahmoud mahmoud left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for addressing the feedback so quickly!

@kenballus
Copy link
Author

Any update on this? Thanks!

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