From 9ff0790d444983b430b4357379a39cc9f4449288 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 27 Jan 2021 20:08:46 +0200 Subject: [PATCH] Fixed validation --- app/controllers/api/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 16c4be38e..f5084274d 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -439,7 +439,7 @@ App::post('/v1/functions/:functionId/tags') $file['tmp_name'] = (\is_array($file['tmp_name']) && isset($file['tmp_name'][0])) ? $file['tmp_name'][0] : $file['tmp_name']; $file['size'] = (\is_array($file['size']) && isset($file['size'][0])) ? $file['size'][0] : $file['size']; - if (!$$fileExt->isValid($file['tmp_name'])) { // Check if file type is allowed + if (!$fileExt->isValid($file['name'])) { // Check if file type is allowed throw new Exception('File type not allowed', 400); }