1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-09 08:06:38 +02:00

plupload wasn't displaying upload errors correctly.

This commit is contained in:
Cameron
2018-08-10 13:51:21 -07:00
parent 5df7313606
commit cc6155a226
2 changed files with 21 additions and 5 deletions

View File

@@ -1936,8 +1936,13 @@ class e_file
* 8 - unknown file type
* 9 - unacceptable file type (prone to exploits)
*/
function isClean($filename, $target_name, $allowed_filetypes = array(), $unknown = false)
function isClean($filename, $target_name='', $allowed_filetypes = array(), $unknown = false)
{
if(empty($target_name)) // no temp file, just use the filename.
{
$target_name = $filename;
}
$this->setErrorNum(null);
// 1. Start by checking against filetypes - that's the easy one!
$file_ext = pathinfo($target_name, PATHINFO_EXTENSION);