Definition at line 23 of file WhiteListUrlValidator.php.
◆ __construct()
| ILIAS\AuthApache\WhiteListUrlValidator::__construct |
( |
private string |
$url, |
|
|
array |
$whitelist |
|
) |
| |
◆ isValid()
| ILIAS\AuthApache\WhiteListUrlValidator::isValid |
( |
| ) |
|
◆ isValidHost()
| ILIAS\AuthApache\WhiteListUrlValidator::isValidHost |
( |
string |
$host | ) |
|
|
private |
Definition at line 38 of file WhiteListUrlValidator.php.
38 : bool
39 {
40 foreach ($this->whitelist as $valid_host) {
41 if ($host === $valid_host) {
42 return true;
43 }
44
45 if (!str_starts_with($valid_host, '.')) {
46 $valid_host = '.' . $valid_host;
47 }
48
49 if ((\strlen($host) > \strlen($valid_host)) && substr(
50 $host,
51 (0 - \strlen($valid_host))
52 ) === $valid_host) {
53 return true;
54 }
55 }
56
57 return false;
58 }
Referenced by ILIAS\AuthApache\WhiteListUrlValidator\isValid().
◆ $whitelist
| array ILIAS\AuthApache\WhiteListUrlValidator::$whitelist |
|
private |
The documentation for this class was generated from the following file: