add a check to disallow uploading files using the default secret key
All checks were successful
/ docker (push) Successful in 1m44s
All checks were successful
/ docker (push) Successful in 1m44s
This commit is contained in:
parent
d9da3eb9ab
commit
a56fe5d619
10
upload.php
10
upload.php
@ -70,6 +70,16 @@ try {
|
||||
die();
|
||||
}
|
||||
|
||||
// Check if the secret is the default one, and if so, tell the user to change it
|
||||
if ($secret == "set me") {
|
||||
returnJson(array(
|
||||
'status' => 'ERROR',
|
||||
'url' => 'You need to set your upload secret in the configuration section of the upload.php file',
|
||||
'timeTaken' => getTimeTaken()
|
||||
));
|
||||
die();
|
||||
}
|
||||
|
||||
// Check if the file was uploaded
|
||||
if (!isset($file)) {
|
||||
returnJson(array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user