Fix regression
This commit is contained in:
parent
56a9f5c48b
commit
37c9afebd9
@ -160,7 +160,7 @@ $type = 'application/octet-stream'; // By default
|
|||||||
if (GETPOST('type', 'alpha')) $type=GETPOST('type', 'alpha');
|
if (GETPOST('type', 'alpha')) $type=GETPOST('type', 'alpha');
|
||||||
else $type=dol_mimetype($original_file);
|
else $type=dol_mimetype($original_file);
|
||||||
// Security: Force to octet-stream if file is a dangerous file. For example when it is a .noexe file
|
// Security: Force to octet-stream if file is a dangerous file. For example when it is a .noexe file
|
||||||
if (!dolIsAllowedForPreview($original_file)) {
|
if (!in_array($type, array('text/x-javascript')) && !dolIsAllowedForPreview($original_file)) {
|
||||||
$type = 'application/octet-stream';
|
$type = 'application/octet-stream';
|
||||||
}
|
}
|
||||||
// Security: Delete string ../ into $original_file
|
// Security: Delete string ../ into $original_file
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user