1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[feature/attach-dl] Use extension_allowed() again.

PHPBB3-11042
This commit is contained in:
Andreas Fischer
2012-08-07 13:51:07 +02:00
parent d6e8fbf94a
commit 4b06a220af
2 changed files with 2 additions and 27 deletions

View File

@@ -290,11 +290,8 @@ else if ($download_id)
}
}
// disallowed?
$extensions = $cache->obtain_attach_extensions($row['forum_id']);
$attachments_filtered = phpbb_filter_disallowed_extensions($extensions, array($attachment));
if (empty($attachments_filtered))
$extensions = array();
if (!extension_allowed($row['forum_id'], $attachment['extension'], $extensions))
{
send_status_line(404, 'Forbidden');
trigger_error(sprintf($user->lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension']));