mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 23:07:39 +02:00
[ticket/13765] Verify SERVER_PROTOCOL has the expected format before using it.
PHPBB3-13765
This commit is contained in:
committed by
Andreas Fischer
parent
35d2467c94
commit
463c62df18
@@ -2782,7 +2782,7 @@ function send_status_line($code, $message)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!empty($_SERVER['SERVER_PROTOCOL']))
|
if (!empty($_SERVER['SERVER_PROTOCOL']) && is_string($_SERVER['SERVER_PROTOCOL']) && preg_match('#^HTTP/[0-9]\.[0-9]$#', $_SERVER['SERVER_PROTOCOL']))
|
||||||
{
|
{
|
||||||
$version = $_SERVER['SERVER_PROTOCOL'];
|
$version = $_SERVER['SERVER_PROTOCOL'];
|
||||||
}
|
}
|
||||||
|
@@ -130,7 +130,7 @@ if (phpbb_has_trailing_path($phpEx))
|
|||||||
{
|
{
|
||||||
$prefix = 'Status:';
|
$prefix = 'Status:';
|
||||||
}
|
}
|
||||||
else if (!empty($_SERVER['SERVER_PROTOCOL']))
|
else if (!empty($_SERVER['SERVER_PROTOCOL']) && is_string($_SERVER['SERVER_PROTOCOL']) && preg_match('#^HTTP/[0-9]\.[0-9]$#', $_SERVER['SERVER_PROTOCOL']))
|
||||||
{
|
{
|
||||||
$prefix = $_SERVER['SERVER_PROTOCOL'];
|
$prefix = $_SERVER['SERVER_PROTOCOL'];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user