diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2010-09-11 21:55:11 +0200 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2010-09-11 22:01:31 +0200 |
| commit | bef108a5cc1cc80068f7066b5c18c5631b8dbc32 (patch) | |
| tree | ca1aeb7965dfdc8ed8cc103212488f83fd1d1884 /phpBB/download | |
| parent | fecca4ef21e15673c4d3fff27e528afbee127a91 (diff) | |
| download | forums-bef108a5cc1cc80068f7066b5c18c5631b8dbc32.tar forums-bef108a5cc1cc80068f7066b5c18c5631b8dbc32.tar.gz forums-bef108a5cc1cc80068f7066b5c18c5631b8dbc32.tar.bz2 forums-bef108a5cc1cc80068f7066b5c18c5631b8dbc32.tar.xz forums-bef108a5cc1cc80068f7066b5c18c5631b8dbc32.zip | |
[ticket/9609] Change header() calls setting HTTP status to send_status_line().
PHPBB3-9609
Diffstat (limited to 'phpBB/download')
| -rw-r--r-- | phpBB/download/file.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 1f2cee4d95..5f45b88359 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -77,7 +77,7 @@ if (isset($_GET['avatar'])) // '==' is not a bug - . as the first char is as bad as no dot at all if (strpos($filename, '.') == false) { - header('HTTP/1.0 403 Forbidden'); + send_status_line(403, 'Forbidden'); $exit = true; } @@ -91,7 +91,7 @@ if (isset($_GET['avatar'])) if (!$exit && !in_array($ext, array('png', 'gif', 'jpg', 'jpeg'))) { // no way such an avatar could exist. They are not following the rules, stop the show. - header("HTTP/1.0 403 Forbidden"); + send_status_line(403, 'Forbidden'); $exit = true; } @@ -101,7 +101,7 @@ if (isset($_GET['avatar'])) if (!$filename) { // no way such an avatar could exist. They are not following the rules, stop the show. - header("HTTP/1.0 403 Forbidden"); + send_status_line(403, 'Forbidden'); } else { @@ -199,7 +199,7 @@ else $row['forum_id'] = false; if (!$auth->acl_get('u_pm_download')) { - header('HTTP/1.0 403 Forbidden'); + send_status_line(403, 'Forbidden'); trigger_error('SORRY_AUTH_VIEW_ATTACH'); } @@ -222,7 +222,7 @@ else if (!$allowed) { - header('HTTP/1.0 403 Forbidden'); + send_status_line(403, 'Forbidden'); trigger_error('ERROR_NO_ATTACHMENT'); } } @@ -237,7 +237,7 @@ else if (!download_allowed()) { - header('HTTP/1.0 403 Forbidden'); + send_status_line(403, 'Forbidden'); trigger_error($user->lang['LINKAGE_FORBIDDEN']); } @@ -383,7 +383,7 @@ function send_avatar_to_browser($file, $browser) } else { - header('HTTP/1.0 404 Not Found'); + send_status_line(404, 'Not Found'); } } |
