From 3c9440099e8de02ebbbe3a96fedd9d4e81011f7d Mon Sep 17 00:00:00 2001 From: "Eric Johansson (neku)" Date: Mon, 23 Feb 2015 15:33:49 +0100 Subject: [PATCH] Update api.php --- api.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api.php b/api.php index 8b2a78d..e051867 100644 --- a/api.php +++ b/api.php @@ -5,6 +5,9 @@ if(isset($_GET['d'])) { include_once('includes/core.php'); switch ($_GET['d']) { case 'upload': + //If no file is being posted, exit + if(empty($_FILES['file'])){ + exit('You fucked up, nothing to do.');} //Set the name value to the original filename $name = $_FILES['file']['name']; $arg = 'custom_original';