mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-24 02:48:56 +00:00
[feature/attach-dl] Move !download_allowed() check up.
PHPBB3-11042
This commit is contained in:
parent
ecab0212f8
commit
b6d4ee4244
1 changed files with 5 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue