diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-08-07 02:37:08 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-08-07 02:37:08 +0200 |
commit | b6d4ee4244602183f99d57ee154757cd68c7eb75 (patch) | |
tree | b828a467a3e28daa290566aa8dc1c372a252e8e8 | |
parent | ecab0212f8dbea04cd9a9a34a597db246a5290cd (diff) | |
download | forums-b6d4ee4244602183f99d57ee154757cd68c7eb75.tar forums-b6d4ee4244602183f99d57ee154757cd68c7eb75.tar.gz forums-b6d4ee4244602183f99d57ee154757cd68c7eb75.tar.bz2 forums-b6d4ee4244602183f99d57ee154757cd68c7eb75.tar.xz forums-b6d4ee4244602183f99d57ee154757cd68c7eb75.zip |
[feature/attach-dl] Move !download_allowed() check up.
PHPBB3-11042
-rw-r--r-- | phpBB/download/file.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 67f315dd2f..23e8327a22 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -191,6 +191,11 @@ if (empty($attachments)) send_status_line(404, 'Not Found'); trigger_error('ERROR_NO_ATTACHMENT'); } +else if (!download_allowed()) +{ + send_status_line(403, 'Forbidden'); + trigger_error($user->lang['LINKAGE_FORBIDDEN']); +} else if ($download_id) { // sizeof($attachments) == 1 @@ -335,12 +340,6 @@ else } } -if (!download_allowed()) -{ - send_status_line(403, 'Forbidden'); - trigger_error($user->lang['LINKAGE_FORBIDDEN']); -} - if ($attachments && sizeof($attachments) < 2) { $attachments = false; |