Skip to content
Snippets Groups Projects
Commit 451b73c2 authored by MartyIX's avatar MartyIX
Browse files

Update class.osticket.php

There are extensions such as "7z" and "gz" that are valid.
parent 1c757ba4
Branches
Tags
No related merge requests found
......@@ -144,7 +144,7 @@ class osTicket {
$allowed = array_map('trim', explode(',', strtolower($allowedFileTypes)));
$filename = is_array($file)?$file['name']:$file;
$ext = strtolower(preg_replace("/.*\.(.{3,4})$/", "$1", $filename));
$ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
//TODO: Check MIME type - file ext. shouldn't be solely trusted.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment