diff --git a/manager/autoloader.php b/manager/autoloader.php index 3d05f74..4f4ba2a 100755 --- a/manager/autoloader.php +++ b/manager/autoloader.php @@ -20,7 +20,7 @@ - + /* AUTOLOADER * * @className Nom de la classe appelee @@ -40,7 +40,7 @@ require_once $path; // on inclue le fichier } - + // On definit l'autoloader comme autoloader (obvious) spl_autoload_register('autoloader', false, true); @@ -61,4 +61,4 @@ /* (2) Retourne si l'utilisateur a le status en question */ function permission($type){ return connected() && in_array($type, $_SESSION['permission']); } -?> \ No newline at end of file +?> diff --git a/manager/module/upload.php b/manager/module/upload.php index 863ccd5..6ddec6c 100644 --- a/manager/module/upload.php +++ b/manager/module/upload.php @@ -19,6 +19,10 @@ * */ private static function simpleFile($prefix, $extension, $file){ + + // Si on est pas connecté, on retourne une erreur -> impossible via token + if( !connected() ) return ManagerError::PermissionError; + /* [0] On formatte les entrées =========================================================*/ $prefix = htmlspecialchars($prefix);