mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/13531] Send 404 Not Found.
PHPBB3-13531
This commit is contained in:
parent
4b9434bf1b
commit
e34b92882a
1 changed files with 15 additions and 1 deletions
|
@ -126,7 +126,21 @@ function phpbb_has_trailing_path($phpEx)
|
|||
// Check if trailing path is used
|
||||
if (phpbb_has_trailing_path($phpEx))
|
||||
{
|
||||
exit('Trailing paths and path_info is not supported by phpBB 3.0');
|
||||
if (substr(strtolower(@php_sapi_name()), 0, 3) === 'cgi')
|
||||
{
|
||||
$prefix = 'Status:';
|
||||
}
|
||||
else if (!empty($_SERVER['SERVER_PROTOCOL']))
|
||||
{
|
||||
$prefix = $_SERVER['SERVER_PROTOCOL'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$prefix = 'HTTP/1.0';
|
||||
}
|
||||
header("$prefix 404 Not Found", true, 404);
|
||||
echo 'Trailing paths and PATH_INFO is not supported by phpBB 3.0';
|
||||
exit;
|
||||
}
|
||||
|
||||
// Register globals and magic quotes have been dropped in PHP 5.4
|
||||
|
|
Loading…
Add table
Reference in a new issue