[php-src] PR #21658: Fix GH-17976: CRLF injection via from and user_agent in HTTP wrapper
| From: | iliaal | Date: | Mon, 06 Apr 2026 23:52:22 +0000 |
| Subject: | [php-src] PR #21658: Fix GH-17976: CRLF injection via from and user_agent in HTTP wrapper | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-35596@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/21658
Author: iliaal
The fopen HTTP wrapper writes
from and user_agent INI settings (and the
user_agent stream context option) into HTTP request headers without stripping CR/LF
characters, allowing header injection.
Truncate at the first \r or \n and emit E_WARNING.
Fixes #17976