Skip to content

ext/soap: truncate header values containing newline characters.#22781

Open
devnexen wants to merge 1 commit into
php:masterfrom
devnexen:gh22771-adjacent
Open

ext/soap: truncate header values containing newline characters.#22781
devnexen wants to merge 1 commit into
php:masterfrom
devnexen:gh22771-adjacent

Conversation

@devnexen

Copy link
Copy Markdown
Member

Commit 3dcdb98 routed the user_agent option through a truncate-and-warn check, but the Content-Type context option, the soapaction and the cookie names and values reach the same request buffer unchecked, so a CR/LF in any of them still injects arbitrary request headers.

Emit all of them through that same check. The helper now takes an explicit length so the char* soapaction can share it.

Commit 3dcdb98 routed the user_agent option through a truncate-and-warn
check, but the Content-Type context option, the soapaction and the cookie
names and values reach the same request buffer unchecked, so a CR/LF in any
of them still injects arbitrary request headers.

Emit all of them through that same check. The helper now takes an explicit
length so the char* soapaction can share it.
@devnexen
devnexen marked this pull request as ready for review July 17, 2026 12:45
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.

1 participant