From c50ad689d33de5a93ca59653f1c46c89a67ca78b Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 8 Nov 2016 10:44:29 +0100 Subject: [PATCH] mintest --- build/api/core/Authentification.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/api/core/Authentification.php b/build/api/core/Authentification.php index 8c98537..325eca5 100644 --- a/build/api/core/Authentification.php +++ b/build/api/core/Authentification.php @@ -78,9 +78,9 @@ * */ public static function deepCheck(){ - /* [1] Si aucune authentification + /* [1] Si aucun token =========================================================*/ - if( self::auth() == 0 ) + if( is_null($GLOBALS['TOKEN']) ) return false; @@ -101,7 +101,7 @@ /* (3) Compares content */ $hashed = self::secure_hash($GLOBALS['TOKEN']); - if( strlen($hashed) !== 64 || $fc !== $hashed ) + if( strlen($hashed) !== 64 || $hashed !== $fc ) return false; /* (4) Stores new content */ @@ -169,7 +169,7 @@ * */ public static function auth(){ - return is_null($GLOBALS['TOKEN']) ? 0 : 1; + return !is_array($GLOBALS['PERM']) ? 0 : count($GLOBALS['PERM']); } }