Check if the current request is matching all required vars.

@return boolean
166222
protected function isMatchingRequestVariables()
    {
        foreach ($this->getMatchRequestVariables() as $key => $value)
        {
            if ($this->getRequest()->get($key) != $value)
            {
                return false;
            }
        }

        return true;
    }
556835
protected function areRequirementsMet(): bool
    {
        $var = $this->token['content'];

        // We need to check everything != $this.
        if ($return = $var !== '$this') {
            $nextPos = (int) TokenHelper::findNextEffective($this->file->getBaseFile(), $this->stackPos + 1);

            if ($nextPos > 0) {
                $isProperty = PropertyHelper::isProperty($this->file->getBaseFile(), $this->stackPos);
                $nextTokenCode = $this->tokens[$nextPos]['code'];

                // The var should be followed by an "=" or can be followed by a semicolon if its a property.
                $return = ($nextTokenCode === T_EQUAL) || ($nextTokenCode === T_SEMICOLON && $isProperty);
            }
        }

        return $return;
    }
595055
public function isValid()
	{
		if ($this->isEmpty()) {
			return false;
		}
		$requiresHost = ! $this->port->isEmpty() || ! $this->credentials->isEmpty() || $this->scheme->equals('http') || $this->scheme->equals('https');
		if ($requiresHost && $this->host->isEmpty()) {
			return false;
		}
		$requiresPath = (! $this->query->isEmpty() || ! $this->fragment->isEmpty()) && (! $this->scheme->isEmpty() || ! $this->host->isEmpty() || ! $this->port->isEmpty() || ! $this->credentials->isEmpty());
		if ($requiresPath && $this->path->isEmpty()) {
			return false;
		}
		return true;
	}
1232733
public function checkRegistryRequestsAnswers()
    {
        $this->escort = \GemsEscort::getInstance();

        //Load the dbaModel
        $model = new \Gems_Model_DbaModel($this->db, $this->escort->getDatabasePaths());
        if ($this->project->databaseFileEncoding) {
            $model->setFileEncoding($this->project->databaseFileEncoding);
        }
        $this->dbaModel = $model;

        return true;
    }
765613
protected function requirementCheck()
    {
        if(count($this->required) > 0)
        {
            // non-exists list
            $nonExist	= array();

            foreach($this->required as $k)
            {
                if(!isset($this->data[$k]))
                {
                    $nonExist[]	= $k;
                }
            }

            if(count($nonExist) > 0)
                return $nonExist;
        }

        return false;
    }
770864
public function hasPhpIniConfigIssue()
    {
        foreach ($this->requirements as $req) {
            if (!$req->isFulfilled() && $req instanceof PhpIniRequirement) {
                return true;
            }
        }

        return false;
    }
979064
public function hasAllRequiredModules()
    {
        $required = $this->getRequiredModules();
        $available = array_keys($this->module->getList());
        $difference = array_diff($required, array_intersect($required, $available));

        return empty($difference);
    }
1005669
protected function areRequirementsMet(): bool
    {
        return ($this->token['code'] !== T_VARIABLE) || (new PropertyHelper($this->file))->isProperty($this->stackPos);
    }
63227
private function requestIsValid(): bool
    {
        return $this->request->has(self::OPENID_ASSOC_HANDLE)
            && $this->request->has(self::OPENID_SIGNED)
            && $this->request->has(self::OPENID_SIG);
    }
447633
public static function checkRequestVars()
    {
        if (version_compare(PHP_VERSION, '6.0.0', '<')) {
            if (ini_get('register_globals')) {
                Debug::_warn('<a target="_blank" href="http://www.php.net/manual/en/security.globals.php">register_globals</a> is on,  strongly recommended to turn off');
                foreach (array_keys($_REQUEST) as $k) {
                    if (isset($GLOBALS[$k]) && $GLOBALS[$k] === $_REQUEST[$k]) {
                        unset($GLOBALS[$k]);
                    }
                }
            }
            if (get_magic_quotes_gpc()
                || ini_get('magic_quotes_sybase') && strtolower(ini_get('magic_quotes_sybase')) != 'off'
            ) {
                Debug::_warn('<a target="_blank" href="http://www.php.net/manual/en/security.magicquotes.php">magic_quotes</a> is on,  strongly recommended to turn off');
                $_GET       = ArrayUtil::mapDeep('stripslashes', $_GET);
                $_POST      = ArrayUtil::mapDeep('stripslashes', $_POST);
                $_COOKIE    = ArrayUtil::mapDeep('stripslashes', $_COOKIE);
                // @todo _REQUEST
            }
        }
        if (self::$cfgStatic['keepQueryDot']) {
            $_GET = Str::parse($_SERVER['QUERY_STRING']);   // allow "." in keys
        }
        if ($_SERVER['REQUEST_METHOD'] == 'POST' && strpos($_SERVER['CONTENT_TYPE'], 'application/json') === 0) {
            Debug::getInstance()->info('JSON POST data');
            $postdata = file_get_contents('php://input');
            $_POST = json_decode($postdata, true);
            $_REQUEST = array_merge($_REQUEST, $_POST);
        }
    }
789951
public function matchesRequest()
    {
        $hasImages = ! Collection::make($this->event->get('attachments'))->isEmpty();

        return parent::matchesRequest() && $hasImages;
    }
929514
public function checkRequirements()
    {
        // Iterate over properties and check if they are set and not null
        $errors = array();
        foreach ( $this->requiredProperties as $property )
        {
            if ( !isset( $this->storage->$property ) ||
                 ( $this->storage->$property === null ) )
            {
                $errors[] = $property;
            }
        }

        // If error array is still empty all requirements are met
        if ( $errors === array() )
        {
            return true;
        }

        // Otherwise return the array with errors
        return $errors;
    }
1212002
public function match($var)
    {
        $ret = false;

        foreach ($this->_types as $type) {
            if (array_search($type, array("*", "mixed")) !== false) {
                $ret = true;
            } elseif (array_search($type, array("number", "numeric")) !== false) {
                $ret = is_numeric($var);
            } elseif (array_search($type, array("bool", "boolean")) !== false) {
                $ret = is_bool($var);
            } elseif ($type == "string") {
                $ret = is_string($var);
            } elseif ($type == "array") {
                $ret = is_array($var);
            } elseif ($type == "object") {
                $ret = is_object($var);
            } elseif ($type == "resource") {
                $ret = is_resource($var);
            } elseif ($type == "function") {
                $ret = is_callable($var);
            } elseif ($type == "scalar") {
                $ret = is_scalar($var);
            } else {
                $ret = is_a($var, $type);
            }

            if ($ret) {
                break;
            }
        }

        return $ret;
    }
156370
public function validateRequest(): bool
    {
        if ($this->useNativeSession) {
            if (!isset($_SESSION[$this->sessionIndex])) {
                return false;
            }
            /** @var array<string, array<string, mixed>> $sess */
            $sess =& $_SESSION[$this->sessionIndex];
        } else {
            if (!isset($this->session[$this->sessionIndex])) {
                return false;
            }
            /** @var array<string, array<string, mixed>> $sess */
            $sess =& $this->session[$this->sessionIndex];
        }

        if (
            empty($this->post[$this->formIndex]) ||
            empty($this->post[$this->formToken])
        ) {
            // User must transmit a complete index/token pair
            return false;
        }

        // Let's pull the POST data
        /** @var string $index */
        $index = $this->post[$this->formIndex];
        /** @var string $token */
        $token = $this->post[$this->formToken];
        if (!\is_string($index) || !\is_string($token)) {
            return false;
        }

        if (!isset($sess[$index])) {
            // CSRF Token not found
            return false;
        }

        if (!\is_string($index) || !\is_string($token)) {
            return false;
        }

        // Grab the value stored at $index
        /** @var array<string, mixed> $stored */
        $stored = $sess[$index];

        // We don't need this anymore
        if ($this->deleteToken($sess[$index])) {
            unset($sess[$index]);
        }

        // Which form action="" is this token locked to?
        /** @var string $lockTo */
        $lockTo = $this->server[$this->lock_type];
        if (\preg_match('#/$#', $lockTo)) {
            // Trailing slashes are to be ignored
            $lockTo = Binary::safeSubstr(
                $lockTo,
                0,
                Binary::safeStrlen($lockTo) - 1
            );
        }

        if (!\hash_equals($lockTo, (string) $stored['lockTo'])) {
            // Form target did not match the request this token is locked to!
            return false;
        }

        // This is the expected token value
        if ($this->hmac_ip === false) {
            // We just stored it wholesale
            /** @var string $expected */
            $expected = $stored['token'];
        } else {
            // We mixed in the client IP address to generate the output
            /** @var string $expected */
            $expected = Base64UrlSafe::encode(
                \hash_hmac(
                    $this->hashAlgo,
                    isset($this->server['REMOTE_ADDR'])
                        ? (string) $this->server['REMOTE_ADDR']
                        : '127.0.0.1',
                    (string) Base64UrlSafe::decode((string) $stored['token']),
                    true
                )
            );
        }
        return \hash_equals($token, $expected);
    }
869011
public function matchRequest(\TYPO3\Flow\Mvc\RequestInterface $request) {
		/** @var \TYPO3\Flow\Security\RequestPatternInterface $pattern */
		foreach ($this->subPatterns as $pattern) {
			if ($pattern->matchRequest($request) === FALSE) {
				return FALSE;
			}
		}

		return TRUE;
	}
669876
public function hasPhpConfigIssue()
    {
        foreach ($this->requirements as $req) {
            if (!$req->isFulfilled() && $req instanceof PhpConfigRequirement) {
                return true;
            }
        }

        return false;
    }
1066379
public function checkRegistryRequestsAnswers()
    {
        if ($this->_gemsData) {
            if ($this->currentUser instanceof \Gems_User_User) {
                $this->_gemsData = $this->currentUser->applyGroupMask($this->_gemsData);
            }
        } else {
            if ($this->db instanceof \Zend_Db_Adapter_Abstract) {
                $this->refresh();
            } else {
                return false;
            }
        }

        return $this->exists;
    }