Skip to content

[pull] master from php:master - #1158

Merged
pull[bot] merged 5 commits into
turkdevops:masterfrom
php:master
Aug 5, 2026
Merged

[pull] master from php:master#1158
pull[bot] merged 5 commits into
turkdevops:masterfrom
php:master

Conversation

@pull

@pull pull Bot commented Aug 5, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

iluuu1994 and others added 5 commits August 5, 2026 16:28
…2017)

The dev server's HTTP parser accumulates Content-Length digits into an
ssize_t without an overflow check; a 30-digit value wraps and the
consumer aborts on pemalloc. Guard the decimal and chunked-size
accumulators against SSIZE_MAX, then reject in on_headers_complete when
the parsed length exceeds post_max_size and reply 413 with the
configured limit in the body.

A chunked request carries no Content-Length, so enforce the same limit
as the chunks accumulate in on_body, and honour a non-zero return from
that callback in the parser. The body buffer was reserved from the
declared length and resized down to the bytes in hand on the next line,
so a chunk header of 7FFFFFFFFFFFFF aborted the server for no gain; grow
it from the received length instead. A parse error between a header name
and its value left the copied name owned by nobody; release both header
strings in php_cli_server_client_dtor().

Fixes GH-22003
This fixes #21101 (comment)

Some extreme build environments happen to get std::numeric_limits through
transitive includes. So we need to put a Include manually

Co-authored-by: David Carlier <devnexen@gmail.com>
This adds so_linger stream socket context options that is used to set
the lingering time in seconds. If the value is lower or equal to 0,
then the lingering is disabled.

Co-authored-by: David Carlier <devnexen@gmail.com>
@pull pull Bot locked and limited conversation to collaborators Aug 5, 2026
@pull pull Bot added the ⤵️ pull label Aug 5, 2026
@pull
pull Bot merged commit 3081f7f into turkdevops:master Aug 5, 2026
1 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants