This commit is contained in:
xdrm-brackets 2016-11-08 10:44:29 +01:00
parent 28284f8725
commit c50ad689d3
1 changed files with 4 additions and 4 deletions

View File

@ -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']);
}
}