RedirectUrlValidator

readonly class \TYPO3\CMS\FrontendLogin\Validation\RedirectUrlValidator

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

Table of Contents

Properties

$eventDispatcher  : EventDispatcherInterface
$logger  : LoggerInterface
$siteFinder  : SiteFinder

Methods

__construct()  : mixed
isValid()  : bool
Checks if a given URL is valid / properly sanitized and/or the domain is known to TYPO3.
isInCurrentDomain()  : bool
Determines whether the URL is on the current host and belongs to the current TYPO3 installation. The scheme part is ignored in the comparison.
isInLocalDomain()  : bool
Determines whether the URL matches a domain known to TYPO3.
isRelativeUrl()  : bool
Determines whether the URL is relative to the current TYPO3 installation.

Properties

$eventDispatcher

protected EventDispatcherInterface $eventDispatcher

Methods

__construct()

public __construct(SiteFinder $siteFinder, EventDispatcherInterface $eventDispatcher, LoggerInterface $logger) : mixed

Parameters

$siteFinder : SiteFinder
$eventDispatcher : EventDispatcherInterface
$logger : LoggerInterface

isInCurrentDomain()

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

protected isInCurrentDomain(RequestInterface $request, string $url) : bool

Parameters

$request : RequestInterface
$url : string

Return values

bool

isInLocalDomain()

Determines whether the URL matches a domain known to TYPO3.

protected isInLocalDomain(string $url) : bool

Parameters

$url : string

Return values

bool

isRelativeUrl()

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

protected isRelativeUrl(RequestInterface $request, string $url) : bool

Parameters

$request : RequestInterface
$url : string

Return values

bool
On this page