mirror of
https://github.com/itflow-org/itflow
synced 2026-08-21 06:55:12 +00:00
Bump ImapEngine from 1.25.1 to 1.25.2
This commit is contained in:
16
libs/vendor/guzzlehttp/psr7/src/Uri.php
vendored
16
libs/vendor/guzzlehttp/psr7/src/Uri.php
vendored
@@ -99,9 +99,11 @@ class Uri implements UriInterface, \JsonSerializable
|
||||
return self::parsePathNoSchemeReference($url);
|
||||
}
|
||||
|
||||
// Preserve bracketed IPv6 literals before encoding, including dotted IPv4 tails.
|
||||
// Preserve bracketed IPv6 literals before encoding, including dotted IPv4
|
||||
// tails. DEL (\x7F) is excluded so a raw-DEL host falls through to the
|
||||
// general path and is rejected rather than silently mutated by parse_url().
|
||||
$prefix = '';
|
||||
$ipv6Prefix = preg_match('%\A([0-9A-Za-z+.-]+://\[[^\]\x00-\x20/?#@]+\])(.*)\z%s', $url, $matches);
|
||||
$ipv6Prefix = preg_match('%\A([0-9A-Za-z+.-]+://\[[^\]\x00-\x20\x7F/?#@]+\])(.*)\z%s', $url, $matches);
|
||||
|
||||
if ($ipv6Prefix === false) {
|
||||
return false;
|
||||
@@ -111,7 +113,11 @@ class Uri implements UriInterface, \JsonSerializable
|
||||
/** @var array{0:string, 1:string, 2:string} $matches */
|
||||
$suffix = $matches[2];
|
||||
|
||||
if ($suffix !== '' && strpos(':/?#', $suffix[0]) === false) {
|
||||
// After the bracketed host only an optional numeric port and/or a
|
||||
// path, query, or fragment may follow. Anything else (for example
|
||||
// `:80@evil` or `:80x`) would let parse_url() reinterpret a
|
||||
// different host.
|
||||
if (preg_match('%\A(?::[0-9]*)?(?:[/?#].*)?\z%s', $suffix) !== 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -690,7 +696,7 @@ class Uri implements UriInterface, \JsonSerializable
|
||||
throw new \InvalidArgumentException('Scheme must be a string');
|
||||
}
|
||||
|
||||
$scheme = \strtr($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
|
||||
$scheme = Utils::asciiToLower($scheme);
|
||||
|
||||
if ($scheme !== '' && !preg_match('/^[a-z][a-z0-9.+-]*$/D', $scheme)) {
|
||||
\trigger_deprecation(
|
||||
@@ -733,7 +739,7 @@ class Uri implements UriInterface, \JsonSerializable
|
||||
throw new \InvalidArgumentException('Host must be a string');
|
||||
}
|
||||
|
||||
$host = \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
|
||||
$host = Utils::asciiToLower($host);
|
||||
self::assertValidHost($host);
|
||||
|
||||
return $host;
|
||||
|
||||
Reference in New Issue
Block a user