app/Extension/HTMLPurifier/Domain.php
false
to array comparison Open
Open
if (null !== $host && false !== strpos($host, '.') && false !== $this->allowedDomains && !\in_array($host, $this->allowedDomains)) {
- Exclude checks
Class extends undeclared class \HTMLPurifier_URIFilter
Open
Open
class Domain extends \HTMLPurifier_URIFilter
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
private $allowedDomains = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function prepare($config)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->allowedDomains = \Config\Security::$purifierAllowedDomains ?? [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$host = $uri->host;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$host = parse_url('xxx://' . $uri->path)['host'] ?? '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
} elseif ('data' === $uri->scheme || 'mailto' === $uri->scheme || 'tel' === $uri->scheme) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $name = 'Domain';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** @var string[] Allowed domains. */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function filter(&$uri, $config, $context)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if (null !== $host && false !== strpos($host, '.') && false !== $this->allowedDomains && !\in_array($host, $this->allowedDomains)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** {@inheritdoc} */
- Exclude checks
Line exceeds 120 characters; contains 140 characters Open
Open
if (null !== $host && false !== strpos($host, '.') && false !== $this->allowedDomains && !\in_array($host, $this->allowedDomains)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if (null === $uri->scheme) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks