Skip to content

Conversation

TimWolla
Copy link
Member

@TimWolla TimWolla commented Aug 30, 2025

RFC 3986 technically allows arbitrarily large integers as port numbers, but our implementation is unable to deal with that, since it expects the port to fit zend_long, reject those explicitly instead of misinterpreting them.

@TimWolla TimWolla force-pushed the uri-rfc3986-port-out-of-range branch from 6dddb92 to 87bb34c Compare August 30, 2025 21:57
@TimWolla TimWolla changed the title uri: Reject out-of-range ports for uri_parser_rfc3986 uri: Reject ports overflowing zend_long for uri_parser_rfc3986 Aug 30, 2025
RFC 3986 technically allows arbitrarily large integers as port numbers, but our
implementation is unable to deal with that, since it expects the port to fit
`zend_long`, reject those explicitly instead of misinterpreting them.
@TimWolla TimWolla force-pushed the uri-rfc3986-port-out-of-range branch from 87bb34c to e242469 Compare August 30, 2025 22:26
Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

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

I think this is right

@TimWolla TimWolla merged commit 5e9080f into php:master Aug 31, 2025
9 checks passed
@TimWolla TimWolla deleted the uri-rfc3986-port-out-of-range branch August 31, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants