This commit is contained in:
ClonOS mybee
2022-12-17 13:57:32 +00:00
parent 3ccf36e54c
commit c5b3176bc4

View File

@@ -24,11 +24,8 @@ if($_SERVER['REQUEST_METHOD'] === 'POST'){
// https://www.php.net/manual/en/features.file-upload.php
// Undefined | Multiple Files | $_FILES Corruption Attack
// If this request falls under any of them, treat it invalid.
if (
!isset($_FILES['file']['error']) ||
is_array($_FILES['file']['error'])
) {
echo json_encode(array('status' => 'Upload Fail: An error occurred!';));
if (!isset($_FILES['file']['error']) || is_array($_FILES['file']['error'])) {
echo json_encode( array( 'status'=>'Upload Fail: An error occurred!'));
exit;
}