-
Bug
-
Resolution: Fixed
-
Minor
-
3.0.7-PL1
-
None
-
None
-
PHP 5.3.1, MySQL 5.1.41, Opera 10.60 / Firefox 3.0.5
If
SELECT config_value FROM *_config WHERE config_name= 'mime_triggers';
|
This happens because in /includes/functions_user.php function avatar_upload($data, &$error) constructs fileupload blindly with the parameter explode('|', $config['mime_triggers']) - which of course gives a valid array having one element (with an empty string).
To fix this I suggest to extend function set_disallowed_content() in /includes/functions_upload.php, which is now:
function set_disallowed_content($disallowed_content)
|
{
|
if ($disallowed_content !== false && is_array($disallowed_content))
|
{
|
$this->disallowed_content = $disallowed_content;
|
}
|
}
|
function set_disallowed_content($disallowed_content)
|
{
|
if ($disallowed_content !== false && is_array($disallowed_content))
|
{
|
foreach ($disallowed_content as $k1 => $v1) // Check each element
|
{
|
if ($v1== '') // Element value is an empty string?
|
{
|
unset($disallowed_content[$k1]); // Remove it from array
|
}
|
}
|
|
// Assigning an empty array is not a problem
|
$this->disallowed_content = $disallowed_content;
|
}
|
}
|
- caused
-
PHPBB-10851 HTML files containing certain tags being rejected as possible attack vectors with "Check attachment file" set to "No"
- Closed