Skip to content

Commit

Permalink
Merge pull request #1978 from nextcloud/dependabot/composer/symfony/h…
Browse files Browse the repository at this point in the history
…ttp-foundation-6.4.14

build(deps): Bump symfony/http-foundation from 6.4.12 to 6.4.14
  • Loading branch information
susnux authored Jan 22, 2025
2 parents bfa9cc8 + 0f9749a commit be9f55a
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 58 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"stecman/symfony-console-completion": "^0.13.0",
"symfony/console": "^6.4.12",
"symfony/event-dispatcher": "^6.4.8",
"symfony/http-foundation": "^6.4.12",
"symfony/http-foundation": "^6.4.14",
"symfony/mailer": "^6.4",
"symfony/polyfill-intl-grapheme": "^1.31.0",
"symfony/polyfill-intl-normalizer": "^1.31.0",
Expand Down
52 changes: 26 additions & 26 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 24 additions & 24 deletions composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -4595,31 +4595,31 @@
},
{
"name": "symfony/deprecation-contracts",
"version": "v3.5.0",
"version_normalized": "3.5.0.0",
"version": "v3.5.1",
"version_normalized": "3.5.1.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1"
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
"shasum": ""
},
"require": {
"php": ">=8.1"
},
"time": "2024-04-18T09:32:20+00:00",
"time": "2024-09-25T14:20:29+00:00",
"type": "library",
"extra": {
"thanks": {
"url": "https://github.com/symfony/contracts",
"name": "symfony/contracts"
},
"branch-alias": {
"dev-main": "3.5-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"installation-source": "dist",
Expand All @@ -4645,7 +4645,7 @@
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0"
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1"
},
"funding": [
{
Expand Down Expand Up @@ -4897,17 +4897,17 @@
},
{
"name": "symfony/http-foundation",
"version": "v6.4.12",
"version_normalized": "6.4.12.0",
"version": "v6.4.14",
"version_normalized": "6.4.14.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "133ac043875f59c26c55e79cf074562127cce4d2"
"reference": "ba020a321a95519303a3f09ec2824d34d601c388"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/133ac043875f59c26c55e79cf074562127cce4d2",
"reference": "133ac043875f59c26c55e79cf074562127cce4d2",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/ba020a321a95519303a3f09ec2824d34d601c388",
"reference": "ba020a321a95519303a3f09ec2824d34d601c388",
"shasum": ""
},
"require": {
Expand All @@ -4929,7 +4929,7 @@
"symfony/mime": "^5.4|^6.0|^7.0",
"symfony/rate-limiter": "^5.4|^6.0|^7.0"
},
"time": "2024-09-20T08:18:25+00:00",
"time": "2024-11-05T16:39:55+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -4957,7 +4957,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v6.4.12"
"source": "https://github.com/symfony/http-foundation/tree/v6.4.14"
},
"funding": [
{
Expand Down Expand Up @@ -5507,8 +5507,8 @@
"type": "library",
"extra": {
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
"url": "https://github.com/symfony/polyfill",
"name": "symfony/polyfill"
}
},
"installation-source": "dist",
Expand Down Expand Up @@ -5584,8 +5584,8 @@
"type": "library",
"extra": {
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
"url": "https://github.com/symfony/polyfill",
"name": "symfony/polyfill"
}
},
"installation-source": "dist",
Expand Down Expand Up @@ -5667,8 +5667,8 @@
"type": "library",
"extra": {
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
"url": "https://github.com/symfony/polyfill",
"name": "symfony/polyfill"
}
},
"installation-source": "dist",
Expand Down
12 changes: 6 additions & 6 deletions composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -671,9 +671,9 @@
'dev_requirement' => false,
),
'symfony/deprecation-contracts' => array(
'pretty_version' => 'v3.5.0',
'version' => '3.5.0.0',
'reference' => '0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1',
'pretty_version' => 'v3.5.1',
'version' => '3.5.1.0',
'reference' => '74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
'aliases' => array(),
Expand Down Expand Up @@ -713,9 +713,9 @@
),
),
'symfony/http-foundation' => array(
'pretty_version' => 'v6.4.12',
'version' => '6.4.12.0',
'reference' => '133ac043875f59c26c55e79cf074562127cce4d2',
'pretty_version' => 'v6.4.14',
'version' => '6.4.14.0',
'reference' => 'ba020a321a95519303a3f09ec2824d34d601c388',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-foundation',
'aliases' => array(),
Expand Down
19 changes: 18 additions & 1 deletion symfony/http-foundation/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Symfony\Component\HttpFoundation;

use Symfony\Component\HttpFoundation\Exception\BadRequestException;
use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException;
use Symfony\Component\HttpFoundation\Exception\JsonException;
use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException;
Expand Down Expand Up @@ -326,6 +327,8 @@ public static function createFromGlobals(): static
* @param array $files The request files ($_FILES)
* @param array $server The server parameters ($_SERVER)
* @param string|resource|null $content The raw body data
*
* @throws BadRequestException When the URI is invalid
*/
public static function create(string $uri, string $method = 'GET', array $parameters = [], array $cookies = [], array $files = [], array $server = [], $content = null): static
{
Expand Down Expand Up @@ -354,6 +357,20 @@ public static function create(string $uri, string $method = 'GET', array $parame
unset($components['fragment']);
}

if (false === $components) {
throw new BadRequestException('Invalid URI.');
}

if (false !== ($i = strpos($uri, '\\')) && $i < strcspn($uri, '?#')) {
throw new BadRequestException('Invalid URI: A URI cannot contain a backslash.');
}
if (\strlen($uri) !== strcspn($uri, "\r\n\t")) {
throw new BadRequestException('Invalid URI: A URI cannot contain CR/LF/TAB characters.');
}
if ('' !== $uri && (\ord($uri[0]) <= 32 || \ord($uri[-1]) <= 32)) {
throw new BadRequestException('Invalid URI: A URI must not start nor end with ASCII control characters or spaces.');
}

if (isset($components['host'])) {
$server['SERVER_NAME'] = $components['host'];
$server['HTTP_HOST'] = $components['host'];
Expand Down Expand Up @@ -1231,7 +1248,7 @@ public function getMethod(): string
}

if (!preg_match('/^[A-Z]++$/D', $method)) {
throw new SuspiciousOperationException(sprintf('Invalid method override "%s".', $method));
throw new SuspiciousOperationException('Invalid HTTP method override.');
}

return $this->method = $method;
Expand Down

0 comments on commit be9f55a

Please sign in to comment.