Server: appserver-7f0f8755-nginx-15961cad18524ec5a9db05f2a6a7e440
Current directory: /code/wp-includes/Requests/src
Software: nginx/1.27.5
Shell Command
Create a new file
Upload file
File: Ssl.php
0) { // Whitespace detected. This can never be a dNSName. return false; } $parts = explode('.', $reference); if ($parts !== array_filter($parts)) { // DNSName cannot contain two dots next to each other. return false; } // Check the first part of the name $first = array_shift($parts); if (strpos($first, '*') !== false) { // Check that the wildcard is the full part if ($first !== '*') { return false; } // Check that we have at least 3 components (including first) if (count($parts) < 2) { return false; } } // Check the remaining parts foreach ($parts as $part) { if (strpos($part, '*') !== false) { return false; } } // Nothing found, verified! return true; } /** * Match a hostname against a dNSName reference * * @param string|Stringable $host Requested host * @param string|Stringable $reference dNSName to match against * @return boolean Does the domain match? * @throws \WpOrg\Requests\Exception\InvalidArgument When either of the passed arguments is not a string or a stringable object. */ public static function match_domain($host, $reference) { if (InputValidator::is_string_or_stringable($host) === false) { throw InvalidArgument::create(1, '$host', 'string|Stringable', gettype($host)); } // Check if the reference is blocklisted first if (self::verify_reference_name($reference) !== true) { return false; } // Check for a direct match if ((string) $host === (string) $reference) { return true; } // Calculate the valid wildcard match if the host is not an IP address // Also validates that the host has 3 parts or more, as per Firefox's ruleset, // as a wildcard reference is only allowed with 3 parts or more, so the // comparison will never match if host doesn't contain 3 parts or more as well. if (ip2long($host) === false) { $parts = explode('.', $host); $parts[0] = '*'; $wildcard = implode('.', $parts); if ($wildcard === (string) $reference) { return true; } } return false; } }
.
24 Items
Change directory
Remove directory
Rename directory
..
2 Items
Change directory
Remove directory
Rename directory
Auth
1 Items
Change directory
Remove directory
Rename directory
Auth.php
0.84 KB
Edit
Delete
Copy
Move
Remame
Autoload.php
9.12 KB
Edit
Delete
Copy
Move
Remame
Capability.php
0.64 KB
Edit
Delete
Copy
Move
Remame
Cookie
1 Items
Change directory
Remove directory
Rename directory
Cookie.php
15.03 KB
Edit
Delete
Copy
Move
Remame
Exception
6 Items
Change directory
Remove directory
Rename directory
Exception.php
1.09 KB
Edit
Delete
Copy
Move
Remame
HookManager.php
0.69 KB
Edit
Delete
Copy
Move
Remame
Hooks.php
2.96 KB
Edit
Delete
Copy
Move
Remame
IdnaEncoder.php
12.14 KB
Edit
Delete
Copy
Move
Remame
Ipv6.php
5.51 KB
Edit
Delete
Copy
Move
Remame
Iri.php
28.93 KB
Edit
Delete
Copy
Move
Remame
Port.php
1.47 KB
Edit
Delete
Copy
Move
Remame
Proxy
1 Items
Change directory
Remove directory
Rename directory
Proxy.php
0.85 KB
Edit
Delete
Copy
Move
Remame
Requests.php
33.2 KB
Edit
Delete
Copy
Move
Remame
Response
1 Items
Change directory
Remove directory
Rename directory
Response.php
4.18 KB
Edit
Delete
Copy
Move
Remame
Session.php
8.89 KB
Edit
Delete
Copy
Move
Remame
Ssl.php
5.3 KB
Edit
Delete
Copy
Move
Remame
Transport
2 Items
Change directory
Remove directory
Rename directory
Transport.php
1.51 KB
Edit
Delete
Copy
Move
Remame
Utility
3 Items
Change directory
Remove directory
Rename directory