8000 Merge branch '4.2' into 4.3 · symfony/symfony@ac88953 · GitHub
[go: up one dir, main page]

Skip to content

Commit ac88953

Browse files
Merge branch '4.2' into 4.3
* 4.2: [HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping bumped Symfony version to 4.2.10 updated VERSION for 4.2.9 updated CHANGELOG for 4.2.9 Use AsserEquals for floating-point values
2 parents 96ecf4b + 31f51ca commit ac88953

File tree

4 files changed

+41
-4
lines changed

4 files changed

+41
-4
lines changed

CHANGELOG-4.2.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,35 @@ in 4.2 minor versions.
77
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
88
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v4.2.0...v4.2.1
99

10+
* 4.2.9 (2019-05-28)
11+
12+
* bug #31584 [Workflow] Do not trigger extra guards (lyrixx)
13+
* bug #31632 [Messenger] Use "real" memory usage to honor --memory-limit (chalasr)
14+
* bug #31599 [Translation] Fixed issue with new vs old TranslatorInterface in TranslationDataCollector (althaus)
15+
* bug #31349 [WebProfilerBundle] Use absolute URL for profiler links (Alumbrados)
16+
* bug #31541 [DI] fix using bindings with locators of service subscribers (nicolas-grekas)
17+
* bug #31568 [Process] Fix infinite waiting for stopped process (mshavliuk)
18+
* bug #31551 [ProxyManager] isProxyCandidate() does not take into account interfaces (andrerom)
19+
* bug #31335 [Doctrine] Respect parent class contract in ContainerAwareEventManager (Koc)
20+
* bug #31421 [Routing][AnnotationClassLoader] fix utf-8 encoding in default route name (przemyslaw-bogusz)
21+
* bug #31510 Use the current working dir as default first arg in 'link' binary (lyrixx)
22+
* bug #31524 [HttpFoundation] prevent deprecation when filesize matches error code (xabbuh)
23+
* bug #31535 [Debug] Wrap call to require_once in a try/catch (lyrixx)
24+
* bug #31477 [PropertyAccess] Add missing property to PropertyAccessor (vudaltsov)
25+
* bug #31479 [Cache] fix saving unrelated keys in recursive callback calls (nicolas-grekas)
26+
* bug #31438 [Serializer] Fix denormalization of object with variadic constructor typed argument (ajgarlag)
27+
* bug #31445 [Messenger] Making cache rebuild correctly when message subscribers change (weaverryan)
28+
* bug #31442 [Validator] Fix finding translator parent definition in compiler pass (deguif)
29+
* bug #31475 [HttpFoundation] Allow set 'None' on samesite cookie flag (markitosgv)
30+
* bug #31456 Remove deprecated usage of some Twig features (fabpot)
31+
* bug #31207 [Routing] Fixed unexpected 404 NoConfigurationException (yceruto)
32+
* bug #31261 [Console] Commands with an alias should not be recognized as ambiguous when using register (Simperfit)
33+
* bug #31371 [DI] Removes number of elements information in debug mode (jschaedl)
34+
* bug #31418 [FrameworkBundle] clarify the possible class/interface of the cache (xabbuh)
35+
* bug #31411 [Intl] Fix root fallback locale (ro0NL)
36+
* bug #31377 [Console] Fix auto-complete for ChoiceQuestion (multi-select answers) (battye)
37+
* bug #31380 [WebProfilerBundle] Don't filter submitted IP 8000 values (javiereguiluz)
38+
1039
* 4.2.8 (2019-05-01)
1140

1241
* bug #31338 Revert "bug #30620 [FrameworkBundle][HttpFoundation] make session service resettable (dmaicher)" (nicolas-grekas)

src/Symfony/Component/HttpFoundation/BinaryFileResponse.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,17 @@ public function prepare(Request $request)
223223
list($pathPrefix, $location) = $part;
224224
if (substr($path, 0, \strlen($pathPrefix)) === $pathPrefix) {
225225
$path = $location.substr($path, \strlen($pathPrefix));
226+
// Only set X-Accel-Redirect header if a valid URI can be produced
227+
// as nginx does not serve arbitrary file paths.
228+
$this->headers->set($type, $path);
229+
$this->maxlen = 0;
226230
break;
227231
}
228232
}
233+
} else {
234+
$this->headers->set($type, $path);
235+
$this->maxlen = 0;
229236
}
230-
$this->headers->set($type, $path);
231-
$this->maxlen = 0;
232237
} elseif ($request->headers->has('Range')) {
233238
// Process the range headers.
234239
if (!$request->headers->has('If-Range') || $this->hasValidIfRangeHeader($request->headers->get('If-Range'))) {

src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ public function getSampleXAccelMappings()
339339
['/var/www/var/www/files/foo.txt', '/var/www/=/files/', '/files/var/www/files/foo.txt'],
340340
['/home/Foo/bar.txt', '/var/www/=/files/,/home/Foo/=/baz/', '/baz/bar.txt'],
341341
['/home/Foo/bar.txt', '"/var/www/"="/files/", "/home/Foo/"="/baz/"', '/baz/bar.txt'],
342+
['/tmp/bar.txt', '"/var/www/"="/files/", "/home/Foo/"="/baz/"', null],
342343
];
343344
}
344345

src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ public function testConstructorWithSimpleTypes()
4343
$this->assertSame('0', $response->getContent());
4444

4545
$response = new JsonResponse(0.1);
46-
$this->assertSame('0.1', $response->getContent());
46+
$this->assertEquals('0.1', $response->getContent());
47+
$this->assertInternalType('string', $response->getContent());
4748

4849
$response = new JsonResponse(true);
4950
$this->assertSame('true', $response->getContent());
@@ -131,7 +132,8 @@ public function testStaticCreateWithSimpleTypes()
131132

132133
$response = JsonResponse::create(0.1);
133134
$this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response);
134-
$this->assertSame('0.1', $response->getContent());
135+
$this->assertEquals('0.1', $response->getContent());
136+
$this->assertInternalType('string', $response->getContent());
135137

136138
$response = JsonResponse::create(true);
137139
$this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response);

0 commit comments

Comments
 (0)
0