hyperlink icon indicating copy to clipboard operation
hyperlink copied to clipboard

Fix non-numeric port number bug (addresses #180)

Open kenballus opened this issue 1 year ago • 1 comments

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 avatar Jan 31 '23 22:01 kenballus