Skip to content
Snippets Groups Projects
Commit 38e24736 authored by Jared Hancock's avatar Jared Hancock
Browse files

Merge pull request #719 from MartyIX/patch-2


Update class.osticket.php

Reviewed-By: default avatarJared Hancock <jared@osticket.com>
parents cf5414b1 451b73c2
No related branches found
No related tags found
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.
Finish editing this message first!
Please register or to comment