Skip to content

uri: Reject ports overflowing zend_long for uri_parser_rfc3986 - #19644

Merged
TimWolla merged 1 commit into
php:masterfrom
TimWolla:uri-rfc3986-port-out-of-range
Aug 31, 2025
Merged

uri: Reject ports overflowing zend_long for uri_parser_rfc3986#19644
TimWolla merged 1 commit into
php:masterfrom
TimWolla:uri-rfc3986-port-out-of-range

Conversation

@TimWolla

@TimWollaTimWolla commented Aug 30, 2025

Copy link
Copy Markdown
Member

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.

Comment threadext/uri/uri_parser_rfc3986.c Outdated
@TimWolla
TimWollaforce-pushed the uri-rfc3986-port-out-of-range branch from 6dddb92 to 87bb34cCompareAugust 30, 2025 21:57
@TimWollaTimWolla changed the title uri: Reject out-of-range ports for uri_parser_rfc3986uri: Reject ports overflowing zend_long for uri_parser_rfc3986Aug 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
TimWollaforce-pushed the uri-rfc3986-port-out-of-range branch from 87bb34c to e242469CompareAugust 30, 2025 22:26

@ndosschendossche left a comment

Copy link
Copy Markdown
Member

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:masterAug 31, 2025
9 checks passed
@TimWolla
TimWolla deleted the uri-rfc3986-port-out-of-range branch August 31, 2025 12:47
Sign up for freeto 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

@TimWolla@kocsismate@ndossche