aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/download/file.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2012-08-07 13:51:07 +0200
committerAndreas Fischer <bantu@phpbb.com>2012-08-07 13:51:07 +0200
commit4b06a220af23dd8888a9e7501348170746663458 (patch)
treea1774f8f60ba3d6d81cb6985d276505f59e9b261 /phpBB/download/file.php
parentd6e8fbf94ad0f2a8ef5513dc8db4660a7b490027 (diff)
downloadforums-4b06a220af23dd8888a9e7501348170746663458.tar
forums-4b06a220af23dd8888a9e7501348170746663458.tar.gz
forums-4b06a220af23dd8888a9e7501348170746663458.tar.bz2
forums-4b06a220af23dd8888a9e7501348170746663458.tar.xz
forums-4b06a220af23dd8888a9e7501348170746663458.zip
[feature/attach-dl] Use extension_allowed() again.
PHPBB3-11042
Diffstat (limited to 'phpBB/download/file.php')
-rw-r--r--phpBB/download/file.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index c300df0235..b1a376155d 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -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']));