aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/download/file.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2012-08-07 02:47:18 +0200
committerAndreas Fischer <bantu@phpbb.com>2012-08-07 02:47:18 +0200
commitbba348d68a3114c3c6cad6f1d92855084ce8fa64 (patch)
tree23e855e1e7d3cd584be6ea9d012ea48c120aacc4 /phpBB/download/file.php
parentb6d4ee4244602183f99d57ee154757cd68c7eb75 (diff)
downloadforums-bba348d68a3114c3c6cad6f1d92855084ce8fa64.tar
forums-bba348d68a3114c3c6cad6f1d92855084ce8fa64.tar.gz
forums-bba348d68a3114c3c6cad6f1d92855084ce8fa64.tar.bz2
forums-bba348d68a3114c3c6cad6f1d92855084ce8fa64.tar.xz
forums-bba348d68a3114c3c6cad6f1d92855084ce8fa64.zip
[feature/attach-dl] phpbb_check_attach_extensions: Get rid of pass-by-reference
PHPBB3-11042
Diffstat (limited to 'phpBB/download/file.php')
-rw-r--r--phpBB/download/file.php11
1 files changed, 2 insertions, 9 deletions
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index 23e8327a22..7044400f90 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -285,16 +285,9 @@ else if ($download_id)
// disallowed?
$extensions = $cache->obtain_attach_extensions($row['forum_id']);
- if ($attachment)
- {
- $ary = array($attachment);
- }
- else
- {
- $ary = &$attachments;
- }
- if (!phpbb_check_attach_extensions($extensions, $ary))
+ $attachments_filtered = phpbb_filter_disallowed_extensions($extensions, array($attachment));
+ if (empty($attachments_filtered))
{
send_status_line(404, 'Forbidden');
trigger_error(sprintf($user->lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension']));