‪TYPO3CMS  ‪main
TYPO3\CMS\FrontendLogin\Validation\RedirectUrlValidator Class Reference
Inheritance diagram for TYPO3\CMS\FrontendLogin\Validation\RedirectUrlValidator:

Public Member Functions

 __construct (protected SiteFinder $siteFinder, protected EventDispatcherInterface $eventDispatcher)
 
 isValid (RequestInterface $request, string $value)
 

Protected Member Functions

 isInCurrentDomain (RequestInterface $request, string $url)
 
 isInLocalDomain (string $url)
 
 isRelativeUrl (string $url)
 

Detailed Description

Used to check if a referrer or a redirect URL is valid to be used as within Frontend Logins for redirects.

for now as it might get adopted for further streamlining against other validation paradigms

Definition at line 34 of file RedirectUrlValidator.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\FrontendLogin\Validation\RedirectUrlValidator::__construct ( protected SiteFinder  $siteFinder,
protected EventDispatcherInterface  $eventDispatcher 
)

Definition at line 38 of file RedirectUrlValidator.php.

Member Function Documentation

◆ isInCurrentDomain()

TYPO3\CMS\FrontendLogin\Validation\RedirectUrlValidator::isInCurrentDomain ( RequestInterface  $request,
string  $url 
)
protected

Determines whether the URL is on the current host and belongs to the current TYPO3 installation. The scheme part is ignored in the comparison.

Definition at line 75 of file RedirectUrlValidator.php.

References TYPO3\CMS\Webhooks\Message\$url.

Referenced by TYPO3\CMS\FrontendLogin\Validation\RedirectUrlValidator\isValid().

◆ isInLocalDomain()

TYPO3\CMS\FrontendLogin\Validation\RedirectUrlValidator::isInLocalDomain ( string  $url)
protected

Determines whether the URL matches a domain known to TYPO3.

Definition at line 90 of file RedirectUrlValidator.php.

References TYPO3\CMS\Webhooks\Message\$url, and TYPO3\CMS\Core\Utility\GeneralUtility\isValidUrl().

Referenced by TYPO3\CMS\FrontendLogin\Validation\RedirectUrlValidator\isValid().

◆ isRelativeUrl()

TYPO3\CMS\FrontendLogin\Validation\RedirectUrlValidator::isRelativeUrl ( string  $url)
protected

Determines whether the URL is relative to the current TYPO3 installation.

Definition at line 110 of file RedirectUrlValidator.php.

References TYPO3\CMS\Webhooks\Message\$url.

Referenced by TYPO3\CMS\FrontendLogin\Validation\RedirectUrlValidator\isValid().

◆ isValid()

TYPO3\CMS\FrontendLogin\Validation\RedirectUrlValidator::isValid ( RequestInterface  $request,
string  $value 
)