Updated symfony/http-foundation from 7.3.3 to 7.3.7

This commit is contained in:
johnnyq 2025-11-16 15:49:11 -05:00
parent efcc0fd5cb
commit 612041635d
11 changed files with 82 additions and 52 deletions

12
plugins/composer.lock generated
View File

@ -893,16 +893,16 @@
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v7.3.3", "version": "v7.3.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-foundation.git", "url": "https://github.com/symfony/http-foundation.git",
"reference": "7475561ec27020196c49bb7c4f178d33d7d3dc00" "reference": "db488a62f98f7a81d5746f05eea63a74e55bb7c4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/7475561ec27020196c49bb7c4f178d33d7d3dc00", "url": "https://api.github.com/repos/symfony/http-foundation/zipball/db488a62f98f7a81d5746f05eea63a74e55bb7c4",
"reference": "7475561ec27020196c49bb7c4f178d33d7d3dc00", "reference": "db488a62f98f7a81d5746f05eea63a74e55bb7c4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -952,7 +952,7 @@
"description": "Defines an object-oriented layer for the HTTP specification", "description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/http-foundation/tree/v7.3.3" "source": "https://github.com/symfony/http-foundation/tree/v7.3.7"
}, },
"funding": [ "funding": [
{ {
@ -972,7 +972,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-08-20T08:04:18+00:00" "time": "2025-11-08T16:41:12+00:00"
}, },
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",

View File

@ -8,11 +8,11 @@ $baseDir = dirname($vendorDir);
return array( return array(
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'662a729f963d39afe703c9d9b7ab4a8c' => $vendorDir . '/symfony/polyfill-php83/bootstrap.php', '662a729f963d39afe703c9d9b7ab4a8c' => $vendorDir . '/symfony/polyfill-php83/bootstrap.php',
'606a39d89246991a373564698c2d8383' => $vendorDir . '/symfony/polyfill-php85/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'606a39d89246991a373564698c2d8383' => $vendorDir . '/symfony/polyfill-php85/bootstrap.php',
'2203a247e6fda86070a5e4e07aed533a' => $vendorDir . '/symfony/clock/Resources/now.php', '2203a247e6fda86070a5e4e07aed533a' => $vendorDir . '/symfony/clock/Resources/now.php',
'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php',
'9d2b9fc6db0f153a0a149fefb182415e' => $vendorDir . '/symfony/polyfill-php84/bootstrap.php', '9d2b9fc6db0f153a0a149fefb182415e' => $vendorDir . '/symfony/polyfill-php84/bootstrap.php',
'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php',
'23f09fe3194f8c2f70923f90d6702129' => $vendorDir . '/illuminate/collections/functions.php', '23f09fe3194f8c2f70923f90d6702129' => $vendorDir . '/illuminate/collections/functions.php',
'60799491728b879e74601d83e38b2cad' => $vendorDir . '/illuminate/collections/helpers.php', '60799491728b879e74601d83e38b2cad' => $vendorDir . '/illuminate/collections/helpers.php',
'f625ee536139dfb962a398b200bdb2bd' => $vendorDir . '/illuminate/support/functions.php', 'f625ee536139dfb962a398b200bdb2bd' => $vendorDir . '/illuminate/support/functions.php',

View File

@ -19,7 +19,7 @@ return array(
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
'Psr\\Clock\\' => array($vendorDir . '/psr/clock/src'), 'Psr\\Clock\\' => array($vendorDir . '/psr/clock/src'),
'Illuminate\\Support\\' => array($vendorDir . '/illuminate/macroable', $vendorDir . '/illuminate/conditionable', $vendorDir . '/illuminate/collections', $vendorDir . '/illuminate/support'), 'Illuminate\\Support\\' => array($vendorDir . '/illuminate/collections', $vendorDir . '/illuminate/conditionable', $vendorDir . '/illuminate/macroable', $vendorDir . '/illuminate/support'),
'Illuminate\\Pagination\\' => array($vendorDir . '/illuminate/pagination'), 'Illuminate\\Pagination\\' => array($vendorDir . '/illuminate/pagination'),
'Illuminate\\Contracts\\' => array($vendorDir . '/illuminate/contracts'), 'Illuminate\\Contracts\\' => array($vendorDir . '/illuminate/contracts'),
'Doctrine\\Inflector\\' => array($vendorDir . '/doctrine/inflector/src'), 'Doctrine\\Inflector\\' => array($vendorDir . '/doctrine/inflector/src'),

View File

@ -9,11 +9,11 @@ class ComposerStaticInit9b9826e5b5cc7806cd328c4112cca75e
public static $files = array ( public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'662a729f963d39afe703c9d9b7ab4a8c' => __DIR__ . '/..' . '/symfony/polyfill-php83/bootstrap.php', '662a729f963d39afe703c9d9b7ab4a8c' => __DIR__ . '/..' . '/symfony/polyfill-php83/bootstrap.php',
'606a39d89246991a373564698c2d8383' => __DIR__ . '/..' . '/symfony/polyfill-php85/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'606a39d89246991a373564698c2d8383' => __DIR__ . '/..' . '/symfony/polyfill-php85/bootstrap.php',
'2203a247e6fda86070a5e4e07aed533a' => __DIR__ . '/..' . '/symfony/clock/Resources/now.php', '2203a247e6fda86070a5e4e07aed533a' => __DIR__ . '/..' . '/symfony/clock/Resources/now.php',
'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php',
'9d2b9fc6db0f153a0a149fefb182415e' => __DIR__ . '/..' . '/symfony/polyfill-php84/bootstrap.php', '9d2b9fc6db0f153a0a149fefb182415e' => __DIR__ . '/..' . '/symfony/polyfill-php84/bootstrap.php',
'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php',
'23f09fe3194f8c2f70923f90d6702129' => __DIR__ . '/..' . '/illuminate/collections/functions.php', '23f09fe3194f8c2f70923f90d6702129' => __DIR__ . '/..' . '/illuminate/collections/functions.php',
'60799491728b879e74601d83e38b2cad' => __DIR__ . '/..' . '/illuminate/collections/helpers.php', '60799491728b879e74601d83e38b2cad' => __DIR__ . '/..' . '/illuminate/collections/helpers.php',
'f625ee536139dfb962a398b200bdb2bd' => __DIR__ . '/..' . '/illuminate/support/functions.php', 'f625ee536139dfb962a398b200bdb2bd' => __DIR__ . '/..' . '/illuminate/support/functions.php',
@ -118,9 +118,9 @@ class ComposerStaticInit9b9826e5b5cc7806cd328c4112cca75e
), ),
'Illuminate\\Support\\' => 'Illuminate\\Support\\' =>
array ( array (
0 => __DIR__ . '/..' . '/illuminate/macroable', 0 => __DIR__ . '/..' . '/illuminate/collections',
1 => __DIR__ . '/..' . '/illuminate/conditionable', 1 => __DIR__ . '/..' . '/illuminate/conditionable',
2 => __DIR__ . '/..' . '/illuminate/collections', 2 => __DIR__ . '/..' . '/illuminate/macroable',
3 => __DIR__ . '/..' . '/illuminate/support', 3 => __DIR__ . '/..' . '/illuminate/support',
), ),
'Illuminate\\Pagination\\' => 'Illuminate\\Pagination\\' =>

View File

@ -929,17 +929,17 @@
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v7.3.3", "version": "v7.3.7",
"version_normalized": "7.3.3.0", "version_normalized": "7.3.7.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-foundation.git", "url": "https://github.com/symfony/http-foundation.git",
"reference": "7475561ec27020196c49bb7c4f178d33d7d3dc00" "reference": "db488a62f98f7a81d5746f05eea63a74e55bb7c4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/7475561ec27020196c49bb7c4f178d33d7d3dc00", "url": "https://api.github.com/repos/symfony/http-foundation/zipball/db488a62f98f7a81d5746f05eea63a74e55bb7c4",
"reference": "7475561ec27020196c49bb7c4f178d33d7d3dc00", "reference": "db488a62f98f7a81d5746f05eea63a74e55bb7c4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -963,7 +963,7 @@
"symfony/mime": "^6.4|^7.0", "symfony/mime": "^6.4|^7.0",
"symfony/rate-limiter": "^6.4|^7.0" "symfony/rate-limiter": "^6.4|^7.0"
}, },
"time": "2025-08-20T08:04:18+00:00", "time": "2025-11-08T16:41:12+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@ -991,7 +991,7 @@
"description": "Defines an object-oriented layer for the HTTP specification", "description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/http-foundation/tree/v7.3.3" "source": "https://github.com/symfony/http-foundation/tree/v7.3.7"
}, },
"funding": [ "funding": [
{ {

View File

@ -5,7 +5,7 @@
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => '981fb9585d0c76e8b9c31812d58dfdd5b56d6454', 'reference' => 'efcc0fd5cb5c6d1b8fcb459252a4ef12fb5c095a',
'name' => '__root__', 'name' => '__root__',
'dev' => true, 'dev' => true,
), ),
@ -16,7 +16,7 @@
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => '981fb9585d0c76e8b9c31812d58dfdd5b56d6454', 'reference' => 'efcc0fd5cb5c6d1b8fcb459252a4ef12fb5c095a',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'carbonphp/carbon-doctrine-types' => array( 'carbonphp/carbon-doctrine-types' => array(
@ -158,12 +158,12 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/http-foundation' => array( 'symfony/http-foundation' => array(
'pretty_version' => 'v7.3.3', 'pretty_version' => 'v7.3.7',
'version' => '7.3.3.0', 'version' => '7.3.7.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-foundation', 'install_path' => __DIR__ . '/../symfony/http-foundation',
'aliases' => array(), 'aliases' => array(),
'reference' => '7475561ec27020196c49bb7c4f178d33d7d3dc00', 'reference' => 'db488a62f98f7a81d5746f05eea63a74e55bb7c4',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/polyfill-mbstring' => array( 'symfony/polyfill-mbstring' => array(

View File

@ -164,7 +164,7 @@ class BinaryFileResponse extends Response
for ($i = 0, $filenameLength = mb_strlen($filename, $encoding); $i < $filenameLength; ++$i) { for ($i = 0, $filenameLength = mb_strlen($filename, $encoding); $i < $filenameLength; ++$i) {
$char = mb_substr($filename, $i, 1, $encoding); $char = mb_substr($filename, $i, 1, $encoding);
if ('%' === $char || \ord($char) < 32 || \ord($char) > 126) { if ('%' === $char || \ord($char[0]) < 32 || \ord($char[0]) > 126) {
$filenameFallback .= '_'; $filenameFallback .= '_';
} else { } else {
$filenameFallback .= $char; $filenameFallback .= $char;

View File

@ -300,10 +300,21 @@ class Request
$server['PATH_INFO'] = ''; $server['PATH_INFO'] = '';
$server['REQUEST_METHOD'] = strtoupper($method); $server['REQUEST_METHOD'] = strtoupper($method);
if (($i = strcspn($uri, ':/?#')) && ':' === ($uri[$i] ?? null) && (strspn($uri, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.') !== $i || strcspn($uri, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'))) {
throw new BadRequestException('Invalid URI: Scheme is malformed.');
}
if (false === $components = parse_url(\strlen($uri) !== strcspn($uri, '?#') ? $uri : $uri.'#')) { if (false === $components = parse_url(\strlen($uri) !== strcspn($uri, '?#') ? $uri : $uri.'#')) {
throw new BadRequestException('Invalid URI.'); throw new BadRequestException('Invalid URI.');
} }
$part = ($components['user'] ?? '').':'.($components['pass'] ?? '');
if (':' !== $part && \strlen($part) !== strcspn($part, '[]')) {
throw new BadRequestException('Invalid URI: Userinfo is malformed.');
}
if (($part = $components['host'] ?? '') && !self::isHostValid($part)) {
throw new BadRequestException('Invalid URI: Host is malformed.');
}
if (false !== ($i = strpos($uri, '\\')) && $i < strcspn($uri, '?#')) { if (false !== ($i = strpos($uri, '\\')) && $i < strcspn($uri, '?#')) {
throw new BadRequestException('Invalid URI: A URI cannot contain a backslash.'); throw new BadRequestException('Invalid URI: A URI cannot contain a backslash.');
} }
@ -1091,10 +1102,8 @@ class Request
// host is lowercase as per RFC 952/2181 // host is lowercase as per RFC 952/2181
$host = strtolower(preg_replace('/:\d+$/', '', trim($host))); $host = strtolower(preg_replace('/:\d+$/', '', trim($host)));
// as the host can come from the user (HTTP_HOST and depending on the configuration, SERVER_NAME too can come from the user) // the host can come from the user (HTTP_HOST and depending on the configuration, SERVER_NAME too can come from the user)
// check that it does not contain forbidden characters (see RFC 952 and RFC 2181) if ($host && !self::isHostValid($host)) {
// use preg_replace() instead of preg_match() to prevent DoS attacks with long host names
if ($host && '' !== preg_replace('/(?:^\[)?[a-zA-Z0-9-:\]_]+\.?/', '', $host)) {
if (!$this->isHostValid) { if (!$this->isHostValid) {
return ''; return '';
} }
@ -1236,15 +1245,22 @@ class Request
static::initializeFormats(); static::initializeFormats();
} }
$exactFormat = null;
$canonicalFormat = null;
foreach (static::$formats as $format => $mimeTypes) { foreach (static::$formats as $format => $mimeTypes) {
if (\in_array($mimeType, (array) $mimeTypes, true)) { if (\in_array($mimeType, $mimeTypes, true)) {
return $format; $exactFormat = $format;
} }
if (null !== $canonicalMimeType && \in_array($canonicalMimeType, (array) $mimeTypes, true)) { if (null !== $canonicalMimeType && \in_array($canonicalMimeType, $mimeTypes, true)) {
return $format; $canonicalFormat = $format;
} }
} }
if ($format = $exactFormat ?? $canonicalFormat) {
return $format;
}
return null; return null;
} }
@ -1259,7 +1275,7 @@ class Request
static::initializeFormats(); static::initializeFormats();
} }
static::$formats[$format] = \is_array($mimeTypes) ? $mimeTypes : [$mimeTypes]; static::$formats[$format ?? ''] = (array) $mimeTypes;
} }
/** /**
@ -1892,9 +1908,8 @@ class Request
} }
$pathInfo = substr($requestUri, \strlen($baseUrl)); $pathInfo = substr($requestUri, \strlen($baseUrl));
if ('' === $pathInfo) { if ('' === $pathInfo || '/' !== $pathInfo[0]) {
// If substr() returns false then PATH_INFO is set to an empty string return '/'.$pathInfo;
return '/';
} }
return $pathInfo; return $pathInfo;
@ -2101,4 +2116,21 @@ class Request
return $this->isIisRewrite; return $this->isIisRewrite;
} }
/**
* See https://url.spec.whatwg.org/.
*/
private static function isHostValid(string $host): bool
{
if ('[' === $host[0]) {
return ']' === $host[-1] && filter_var(substr($host, 1, -1), \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6);
}
if (preg_match('/\.[0-9]++\.?$/D', $host)) {
return null !== filter_var($host, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4 | \FILTER_NULL_ON_FAILURE);
}
// use preg_replace() instead of preg_match() to prevent DoS attacks with long host names
return '' === preg_replace('/[-a-zA-Z0-9_]++\.?/', '', $host);
}
} }

View File

@ -159,7 +159,7 @@ class ResponseHeaderBag extends HeaderBag
public function setCookie(Cookie $cookie): void public function setCookie(Cookie $cookie): void
{ {
$this->cookies[$cookie->getDomain()][$cookie->getPath()][$cookie->getName()] = $cookie; $this->cookies[$cookie->getDomain() ?? ''][$cookie->getPath()][$cookie->getName()] = $cookie;
$this->headerNames['set-cookie'] = 'Set-Cookie'; $this->headerNames['set-cookie'] = 'Set-Cookie';
} }
@ -170,13 +170,13 @@ class ResponseHeaderBag extends HeaderBag
{ {
$path ??= '/'; $path ??= '/';
unset($this->cookies[$domain][$path][$name]); unset($this->cookies[$domain ?? ''][$path][$name]);
if (empty($this->cookies[$domain][$path])) { if (empty($this->cookies[$domain ?? ''][$path])) {
unset($this->cookies[$domain][$path]); unset($this->cookies[$domain ?? ''][$path]);
if (empty($this->cookies[$domain])) { if (empty($this->cookies[$domain ?? ''])) {
unset($this->cookies[$domain]); unset($this->cookies[$domain ?? '']);
} }
} }

View File

@ -132,14 +132,12 @@ class ServerEvent implements \IteratorAggregate
} }
yield $head; yield $head;
if ($this->data) { if (is_iterable($this->data)) {
if (is_iterable($this->data)) { foreach ($this->data as $data) {
foreach ($this->data as $data) { yield \sprintf('data: %s', $data)."\n";
yield \sprintf('data: %s', $data)."\n";
}
} else {
yield \sprintf('data: %s', $this->data)."\n";
} }
} elseif ('' !== $this->data) {
yield \sprintf('data: %s', $this->data)."\n";
} }
yield "\n"; yield "\n";

View File

@ -219,7 +219,7 @@ class PdoSessionHandler extends AbstractSessionHandler
$table->addColumn($this->timeCol, Types::INTEGER)->setNotnull(true); $table->addColumn($this->timeCol, Types::INTEGER)->setNotnull(true);
break; break;
case 'sqlsrv': case 'sqlsrv':
$table->addColumn($this->idCol, Types::TEXT)->setLength(128)->setNotnull(true); $table->addColumn($this->idCol, Types::STRING)->setLength(128)->setNotnull(true);
$table->addColumn($this->dataCol, Types::BLOB)->setNotnull(true); $table->addColumn($this->dataCol, Types::BLOB)->setNotnull(true);
$table->addColumn($this->lifetimeCol, Types::INTEGER)->setUnsigned(true)->setNotnull(true); $table->addColumn($this->lifetimeCol, Types::INTEGER)->setUnsigned(true)->setNotnull(true);
$table->addColumn($this->timeCol, Types::INTEGER)->setUnsigned(true)->setNotnull(true); $table->addColumn($this->timeCol, Types::INTEGER)->setUnsigned(true)->setNotnull(true);