From cb0958c171a3f594d79e15680a00bc96b134cd70 Mon Sep 17 00:00:00 2001 From: dam-man Date: Fri, 13 Jan 2017 11:27:07 +0100 Subject: [PATCH] Update uploads.php Updated code to com_installer standard --- .../components/com_jedchecker/controllers/uploads.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/source/administrator/components/com_jedchecker/controllers/uploads.php b/source/administrator/components/com_jedchecker/controllers/uploads.php index 1bd3790..36a8dea 100644 --- a/source/administrator/components/com_jedchecker/controllers/uploads.php +++ b/source/administrator/components/com_jedchecker/controllers/uploads.php @@ -41,13 +41,9 @@ class JedcheckerControllerUploads extends JControllerlegacy { $appl = JFactory::getApplication(); $input = JFactory::getApplication()->input; - $token = JSession::getFormToken(); - - // Checking the form token - if (!$token || !$appl->input->get($token, null, 'alnum')) - { - jexit('Invalid Token'); - } + + // Check the sent token by the form + JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); // Gets the uploaded file from the sent form $file = $input->files->get('extension', null, 'raw');