1
0
mirror of https://github.com/nokonoko/Uguu.git synced 2024-01-06 13:35:15 +00:00

Update upload.php

This commit is contained in:
nokonoko 2021-06-28 18:09:34 +02:00
parent 9413fed93b
commit 871ed5f37a

View File

@ -64,13 +64,11 @@ function generateName($file)
//Check if MIME is blacklisted //Check if MIME is blacklisted
if (in_array($type_mime, unserialize(CONFIG_BLOCKED_MIME))) { if (in_array($type_mime, unserialize(CONFIG_BLOCKED_MIME))) {
http_response_code(415); http_response_code(415);
throw new UploadException(UPLOAD_ERR_EXTENSION);
exit(0); exit(0);
} }
//Check if EXT is blacklisted //Check if EXT is blacklisted
if (in_array($ext, unserialize(CONFIG_BLOCKED_EXTENSIONS))) { if (in_array($ext, unserialize(CONFIG_BLOCKED_EXTENSIONS))) {
http_response_code(415); http_response_code(415);
throw new UploadException(UPLOAD_ERR_EXTENSION);
exit(0); exit(0);
} }