Skip to content

Commit cdf1e9b

Browse files
committed
security #cve-2020-15094 Remove headers with internal meaning from HttpClient responses (mpdude)
This PR was merged into the 4.4 branch.
2 parents a5ed890 + 8e8d0ed commit cdf1e9b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

HttpClientKernel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQ
5858

5959
$response = new Response($response->getContent(!$catch), $response->getStatusCode(), $response->getHeaders(!$catch));
6060

61+
$response->headers->remove('X-Body-File');
62+
$response->headers->remove('X-Body-Eval');
63+
$response->headers->remove('X-Content-Digest');
64+
6165
$response->headers = new class($response->headers->all()) extends ResponseHeaderBag {
6266
protected function computeCacheControlValue(): string
6367
{

0 commit comments

Comments
 (0)