mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-18 23:51:49 +02:00
[feature/attach-dl] Move !download_allowed() check up.
PHPBB3-11042
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user