Skip to content

Commit 8989695

Browse files
committed
bug #18688 [HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For (magnusnordlander)
This PR was squashed before being merged into the 2.7 branch (closes #18688). Discussion ---------- [HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | symfony/symfony-docs#6526 Emit a warning when a request has both a trusted Forwarded header and a trusted X-Forwarded-For header, as this is most likely a misconfiguration which causes security issues. Commits ------- ee8842f [HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For
2 parents 6024db9 + 61db9fe commit 8989695

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Resources/config/web.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,9 @@
4646
<argument type="service" id="request_stack" />
4747
<tag name="kernel.event_subscriber" />
4848
</service>
49+
50+
<service id="validate_request_listener" class="Symfony\Component\HttpKernel\EventListener\ValidateRequestListener">
51+
<tag name="kernel.event_subscriber" />
52+
</service>
4953
</services>
5054
</container>

0 commit comments

Comments
 (0)