aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/cache/driver/wincache.php (renamed from phpBB/includes/acm/acm_wincache.php)8
-rw-r--r--phpBB/includes/functions_posting.php2
-rw-r--r--phpBB/includes/functions_upload.php4
-rw-r--r--phpBB/includes/functions_user.php2
4 files changed, 5 insertions, 11 deletions
diff --git a/phpBB/includes/acm/acm_wincache.php b/phpBB/includes/cache/driver/wincache.php
index 0501ab74c5..2e1a138ee9 100644
--- a/phpBB/includes/acm/acm_wincache.php
+++ b/phpBB/includes/cache/driver/wincache.php
@@ -15,17 +15,11 @@ if (!defined('IN_PHPBB'))
exit;
}
-// Include the abstract base
-if (!class_exists('acm_memory'))
-{
- require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
-}
-
/**
* ACM for WinCache
* @package acm
*/
-class acm extends acm_memory
+class phpbb_cache_driver_wincache extends phpbb_cache_driver_memory
{
var $extension = 'wincache';
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index ad90c0c75f..74b5b405a1 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -388,7 +388,7 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
include_once($phpbb_root_path . 'includes/functions_upload.' . $phpEx);
$upload = new fileupload();
- if ($config['check_attachment_content'])
+ if ($config['check_attachment_content'] && isset($config['mime_triggers']))
{
$upload->set_disallowed_content(explode('|', $config['mime_triggers']));
}
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index bd960a1076..f648c585f6 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -458,7 +458,7 @@ class fileerror extends filespec
class fileupload
{
var $allowed_extensions = array();
- var $disallowed_content = array();
+ var $disallowed_content = array('body', 'head', 'html', 'img', 'plaintext', 'a href', 'pre', 'script', 'table', 'title');
var $max_filesize = 0;
var $min_width = 0;
var $min_height = 0;
@@ -539,7 +539,7 @@ class fileupload
{
if ($disallowed_content !== false && is_array($disallowed_content))
{
- $this->disallowed_content = $disallowed_content;
+ $this->disallowed_content = array_diff($disallowed_content, array(''));
}
}
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index b99393d24a..317578cd54 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -2080,7 +2080,7 @@ function avatar_upload($data, &$error)
// Init upload class
include_once($phpbb_root_path . 'includes/functions_upload.' . $phpEx);
- $upload = new fileupload('AVATAR_', array('jpg', 'jpeg', 'gif', 'png'), $config['avatar_filesize'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], explode('|', $config['mime_triggers']));
+ $upload = new fileupload('AVATAR_', array('jpg', 'jpeg', 'gif', 'png'), $config['avatar_filesize'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], (isset($config['mime_triggers']) ? explode('|', $config['mime_triggers']) : false));
if (!empty($_FILES['uploadfile']['name']))
{