diff options
Diffstat (limited to 'php/upload.php')
| -rw-r--r-- | php/upload.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/php/upload.php b/php/upload.php index a189f87..7ea89ff 100644 --- a/php/upload.php +++ b/php/upload.php @@ -84,6 +84,10 @@ function uploadFile($file) if (!in_array(mime_content_type($file), $FILTER_MIME)) { throw new UploadException(UPLOAD_ERR_EXTENSION); } + if $WHITELIST == true { + if (!in_array(mime_content_type($file), $WHITELIST_MIME)) { + throw new UploadException(UPLOAD_ERR_EXTENSION); + } // Check if a file with the same hash and size (a file which is the same) |
