Skip to content

File tree

3 files changed

+77
-5
lines changed

3 files changed

+77
-5
lines changed

composer.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"behat/mink-goutte-driver": "~1.0",
5151
"behat/mink-selenium2-driver": "^1.3",
5252
"behat/symfony2-extension": "~2.0",
53+
"cweagans/composer-patches": "^1.7",
5354
"ingenerator/behat-tableassert": "^1.1",
5455
"league/flysystem": "^2.5",
5556
"liip/functional-test-bundle": "^4.3",
@@ -110,7 +111,10 @@
110111
"platform": {
111112
"php": "7.2"
112113
},
113-
"sort-packages": true
114+
"sort-packages": true,
115+
"allow-plugins": {
116+
"cweagans/composer-patches": true
117+
}
114118
},
115119
"extra": {
116120
"symfony-app-dir": "app",
@@ -124,7 +128,12 @@
124128
{
125129
"file": "app/config/functional_testing.yml"
126130
}
127-
]
131+
],
132+
"patches": {
133+
"symfony/http-foundation": {
134+
"CVE fix for PATH_INFO vulnerability": "patches/symfony-http-foundation-path-info-cve.patch"
135+
}
136+
}
128137
},
129138
"archive": {
130139
"exclude": [

composer.lock

Lines changed: 51 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--- a/vendor/symfony/http-foundation/Request.php
2+
+++ b/vendor/symfony/http-foundation/Request.php
3+
@@ -1984,9 +1984,9 @@ class Request
4+
}
5+
6+
$pathInfo = substr($requestUri, \strlen($baseUrl));
7+
- if (false === $pathInfo || '' === $pathInfo) {
8+
+ if (false === $pathInfo || '' === $pathInfo || '/' !== $pathInfo[0]) {
9+
// If substr() returns false then PATH_INFO is set to an empty string
10+
- return '/';
11+
+ return '/'.$pathInfo;
12+
}
13+
14+
return $pathInfo;
15+

0 commit comments

Comments
 (0)