src/Session/Integrity.php
public static function check(string $variableName = '_MF_SESSION_INTEGRITY_TOKEN_'): bool
    {
        static::init();
        $variableName = (string)$variableName;
        $vHandler = Variables::getInstance();
        $userToken = $vHandler->session->get($variableName, $vHandler::TYPE_STRING);
        $httpReferer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
        $rIntegrity = static::$refererIntegrityEnabled ? \stripos($httpReferer, static::$serverName) !== false : true;
        $tIntegrity = static::$tokenIntegrityEnabled ? $userToken === static::buildToken() : true;
        return $rIntegrity && $tIntegrity;
    }
public static function check(string $variableName = '_MF_SESSION_INTEGRITY_TOKEN_'): bool
    {
        static::init();
        $variableName = (string)$variableName;
        $vHandler = Variables::getInstance();
        $userToken = $vHandler->session->get($variableName, $vHandler::TYPE_STRING);
        $httpReferer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
        $rIntegrity = static::$refererIntegrityEnabled ? \stripos($httpReferer, static::$serverName) !== false : true;
        $tIntegrity = static::$tokenIntegrityEnabled ? $userToken === static::buildToken() : true;
        return $rIntegrity && $tIntegrity;
    }
public static function check ( string $ variableName = '_MF_SESSION_INTEGRITY_TOKEN_' ) : bool { static :: init ( ) ; $ variableName = ( string ) $ variableName ; $ vHandler = Variables :: getInstance ( ) ; $ userToken = $ vHandler -> session -> get ( $ variableName , $ vHandler :: TYPE_STRING ) ; $ httpReferer = isset ( $ _SERVER [ 'HTTP_REFERER' ] ) ? $ _SERVER [ 'HTTP_REFERER' ] : '' ; $ rIntegrity = static :: $ refererIntegrityEnabled ? \ stripos ( $ httpReferer , static :: $ serverName ) !== false : true ; $ tIntegrity = static :: $ tokenIntegrityEnabled ? $ userToken === static :: buildToken ( ) : true ; return $ rIntegrity && $ tIntegrity ; }
Checks session integrity according to session configuration

@param string $variableName
@return bool
Checks session integrity according to session configuration