forked from Wavyzz/dolibarr
FIX vulenrability in uploading file found by 美创科技安全实验室
This commit is contained in:
@@ -796,7 +796,8 @@ function dol_size($size, $type = '')
|
||||
*/
|
||||
function dol_sanitizeFileName($str, $newstr = '_', $unaccent = 1)
|
||||
{
|
||||
$filesystem_forbidden_chars = array('<','>','/','\\','?','*','|','"','°');
|
||||
// List of special chars for filenames are defined on page https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
|
||||
$filesystem_forbidden_chars = array('<', '>', '/', '\\', '?', '*', '|', '"', ':', '°');
|
||||
return dol_string_nospecial($unaccent?dol_string_unaccent($str):$str, $newstr, $filesystem_forbidden_chars);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user