forked from gitbot/uguu
Update upload.php
This commit is contained in:
parent
9413fed93b
commit
871ed5f37a
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user