mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge branch 'ticket/bantu/9764' into develop-olympus
This commit is contained in:
commit
c9b9016ca8
3 changed files with 4 additions and 4 deletions
|
@ -388,7 +388,7 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
|
||||||
include_once($phpbb_root_path . 'includes/functions_upload.' . $phpEx);
|
include_once($phpbb_root_path . 'includes/functions_upload.' . $phpEx);
|
||||||
$upload = new fileupload();
|
$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']));
|
$upload->set_disallowed_content(explode('|', $config['mime_triggers']));
|
||||||
}
|
}
|
||||||
|
|
|
@ -458,7 +458,7 @@ class fileerror extends filespec
|
||||||
class fileupload
|
class fileupload
|
||||||
{
|
{
|
||||||
var $allowed_extensions = array();
|
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 $max_filesize = 0;
|
||||||
var $min_width = 0;
|
var $min_width = 0;
|
||||||
var $min_height = 0;
|
var $min_height = 0;
|
||||||
|
@ -539,7 +539,7 @@ class fileupload
|
||||||
{
|
{
|
||||||
if ($disallowed_content !== false && is_array($disallowed_content))
|
if ($disallowed_content !== false && is_array($disallowed_content))
|
||||||
{
|
{
|
||||||
$this->disallowed_content = $disallowed_content;
|
$this->disallowed_content = array_diff($disallowed_content, array(''));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2080,7 +2080,7 @@ function avatar_upload($data, &$error)
|
||||||
|
|
||||||
// Init upload class
|
// Init upload class
|
||||||
include_once($phpbb_root_path . 'includes/functions_upload.' . $phpEx);
|
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']))
|
if (!empty($_FILES['uploadfile']['name']))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue