‪TYPO3CMS  11.5
TYPO3\CMS\Core\Tests\Unit\Middleware\VerifyHostHeaderTest Class Reference
Inheritance diagram for TYPO3\CMS\Core\Tests\Unit\Middleware\VerifyHostHeaderTest:

Public Member Functions

 isAllowedHostHeaderValueReturnsFalseIfTrustedHostsIsNotConfigured ()
 
 isAllowedHostHeaderValueReturnsTrueIfHostValueMatches (string $httpHost, string $hostNamePattern)
 
 isAllowedHostHeaderValueReturnsFalseIfHostValueMatches (string $httpHost, string $hostNamePattern)
 
 serverNamePatternDataProvider ()
 
 isAllowedHostHeaderValueWorksCorrectlyWithWithServerNamePattern (string $httpHost, string $serverName, bool $isAllowed, string $serverPort='80', string $ssl='Off')
 
 isAllowedHostHeaderValueWorksCorrectlyWithWithServerNamePatternAndSslProxy (string $httpHost, string $serverName, bool $isAllowed, string $serverPort='80', string $ssl='Off')
 
 processThrowsExceptionForNotAllowedHostnameValues (string $httpHost, string $hostNamePattern)
 
 processAllowsAllHostnameValuesIfHostPatternIsSetToAllowAll (string $httpHost, string $hostNamePattern)
 

Static Public Member Functions

static hostnamesMatchingTrustedHostsConfigurationDataProvider ()
 
static hostnamesNotMatchingTrustedHostsConfigurationDataProvider ()
 

Detailed Description

Definition at line 27 of file VerifyHostHeaderTest.php.

Member Function Documentation

◆ hostnamesMatchingTrustedHostsConfigurationDataProvider()

static TYPO3\CMS\Core\Tests\Unit\Middleware\VerifyHostHeaderTest::hostnamesMatchingTrustedHostsConfigurationDataProvider ( )
static

Definition at line 40 of file VerifyHostHeaderTest.php.

◆ hostnamesNotMatchingTrustedHostsConfigurationDataProvider()

static TYPO3\CMS\Core\Tests\Unit\Middleware\VerifyHostHeaderTest::hostnamesNotMatchingTrustedHostsConfigurationDataProvider ( )
static

Definition at line 53 of file VerifyHostHeaderTest.php.

◆ isAllowedHostHeaderValueReturnsFalseIfHostValueMatches()

TYPO3\CMS\Core\Tests\Unit\Middleware\VerifyHostHeaderTest::isAllowedHostHeaderValueReturnsFalseIfHostValueMatches ( string  $httpHost,
string  $hostNamePattern 
)
Parameters
string$httpHost‪HTTP_HOST string
string$hostNamePattern‪trusted hosts pattern
Test:
‪@dataProvider hostnamesNotMatchingTrustedHostsConfigurationDataProvider

Definition at line 85 of file VerifyHostHeaderTest.php.

◆ isAllowedHostHeaderValueReturnsFalseIfTrustedHostsIsNotConfigured()

TYPO3\CMS\Core\Tests\Unit\Middleware\VerifyHostHeaderTest::isAllowedHostHeaderValueReturnsFalseIfTrustedHostsIsNotConfigured ( )
Test:

Definition at line 33 of file VerifyHostHeaderTest.php.

◆ isAllowedHostHeaderValueReturnsTrueIfHostValueMatches()

TYPO3\CMS\Core\Tests\Unit\Middleware\VerifyHostHeaderTest::isAllowedHostHeaderValueReturnsTrueIfHostValueMatches ( string  $httpHost,
string  $hostNamePattern 
)
Parameters
string$httpHost‪HTTP_HOST string
string$hostNamePattern‪trusted hosts pattern
Test:
‪@dataProvider hostnamesMatchingTrustedHostsConfigurationDataProvider

Definition at line 71 of file VerifyHostHeaderTest.php.

◆ isAllowedHostHeaderValueWorksCorrectlyWithWithServerNamePattern()

TYPO3\CMS\Core\Tests\Unit\Middleware\VerifyHostHeaderTest::isAllowedHostHeaderValueWorksCorrectlyWithWithServerNamePattern ( string  $httpHost,
string  $serverName,
bool  $isAllowed,
string  $serverPort = '80',
string  $ssl = 'Off' 
)
Parameters
string$httpHost
string$serverName
bool$isAllowed
string$serverPort
string$ssl
Test:
‪@dataProvider serverNamePatternDataProvider

Definition at line 182 of file VerifyHostHeaderTest.php.

References TYPO3\CMS\Core\Middleware\VerifyHostHeader\ENV_TRUSTED_HOSTS_PATTERN_SERVER_NAME.

◆ isAllowedHostHeaderValueWorksCorrectlyWithWithServerNamePatternAndSslProxy()

TYPO3\CMS\Core\Tests\Unit\Middleware\VerifyHostHeaderTest::isAllowedHostHeaderValueWorksCorrectlyWithWithServerNamePatternAndSslProxy ( string  $httpHost,
string  $serverName,
bool  $isAllowed,
string  $serverPort = '80',
string  $ssl = 'Off' 
)
Parameters
string$httpHost
string$serverName
bool$isAllowed
string$serverPort
string$ssl
Test:
‪@dataProvider serverNamePatternDataProvider

Definition at line 209 of file VerifyHostHeaderTest.php.

References TYPO3\CMS\Core\Middleware\VerifyHostHeader\ENV_TRUSTED_HOSTS_PATTERN_SERVER_NAME.

◆ processAllowsAllHostnameValuesIfHostPatternIsSetToAllowAll()

TYPO3\CMS\Core\Tests\Unit\Middleware\VerifyHostHeaderTest::processAllowsAllHostnameValuesIfHostPatternIsSetToAllowAll ( string  $httpHost,
string  $hostNamePattern 
)
Parameters
string$httpHost‪HTTP_HOST string
string$hostNamePattern‪trusted hosts pattern (not used in this test currently)
Test:
‪@dataProvider hostnamesNotMatchingTrustedHostsConfigurationDataProvider

Definition at line 257 of file VerifyHostHeaderTest.php.

References TYPO3\CMS\Core\Middleware\VerifyHostHeader\ENV_TRUSTED_HOSTS_PATTERN_ALLOW_ALL.

◆ processThrowsExceptionForNotAllowedHostnameValues()

TYPO3\CMS\Core\Tests\Unit\Middleware\VerifyHostHeaderTest::processThrowsExceptionForNotAllowedHostnameValues ( string  $httpHost,
string  $hostNamePattern 
)
Parameters
string$httpHost‪HTTP_HOST string
string$hostNamePattern‪trusted hosts pattern
Test:
‪@dataProvider hostnamesNotMatchingTrustedHostsConfigurationDataProvider

Definition at line 233 of file VerifyHostHeaderTest.php.

◆ serverNamePatternDataProvider()

TYPO3\CMS\Core\Tests\Unit\Middleware\VerifyHostHeaderTest::serverNamePatternDataProvider ( )

Definition at line 93 of file VerifyHostHeaderTest.php.