mirror of
https://github.com/nokonoko/Uguu.git
synced 2024-01-06 13:35:15 +00:00
durr
This commit is contained in:
parent
180e80182f
commit
4b7727f772
@ -130,6 +130,9 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
} else if (respStatus === 413) {
|
} else if (respStatus === 413) {
|
||||||
link.textContent = 'File too big!';
|
link.textContent = 'File too big!';
|
||||||
url.appendChild(link);
|
url.appendChild(link);
|
||||||
|
} else if (respStatus === 415) {
|
||||||
|
link.textContent = 'File not allowed lol!';
|
||||||
|
url.appendChild(link);
|
||||||
} else {
|
} else {
|
||||||
link.textContent = 'Filetype not allowed or server error!';
|
link.textContent = 'Filetype not allowed or server error!';
|
||||||
url.appendChild(link);
|
url.appendChild(link);
|
||||||
|
@ -56,12 +56,14 @@ 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);
|
||||||
throw new Exception('Filetype not allowed!');
|
throw new Exception('Filetype not allowed!');
|
||||||
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);
|
||||||
throw new Exception('Filetype not allowed!');
|
throw new Exception('Filetype not allowed!');
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user