-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Default TrustedHeaderNames are not standard... are they? #17641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Regarding the very common headers from the pre-standard time, they are still used by many systems out there AFAIK. So the goal is to have Symfony working by default in such environments. |
The doc should be updated to mention the standard header though. |
hmm, |
I just ran into this myself. It does read the ip from the Forwarded-header, but uses X-Forwarded-Proto to check whether its a secure-request or not in the Request::isSecure() method. I.e. only the 'for'-section of the Forwarded-header seems to be supported, not the 'proto', 'host' or 'by'. That partial support was added in #11073 |
I just ran headfirst into the partial support for the Forwarded header and spent the last hour or so trying to figure out why my proxy was trusted but generated URLs were ignoring the host. So… a big 👍 for documentation. And a small plea to add proper support for RFC7239. |
And apparantly, mixing Forwarded with X-Forwarded-For is now considered an error if they're not exactly the same, but there is still no support to be allowed to only use the Forwarded-header :( That does add to the confusion, here's that other change #18688 Ideally you'd only provide the standard version: An alternative is to fall back to the old non-standard stuff; |
I'm confused, I can't see the difference between those two... |
The 'and' is not optional in that second sentence |
Closing as we deal with "Forwarded" and with "X-Forwarded-*". |
In my copy of Symfony 3.3, I see the following comment, "@deprecated since version 3.3, to be removed in 4.0," which begs the question. If the $trustedHeaders array is going away, what mechanism replaces it? |
You now need to provide the trusted headers as a bitfield, see eg |
I've already read all of this, none of which clarifies anything for me. Can
somebody please supply me with a real, actionable answer, before I waste
more of my time and my client's money digging into the code and attempting
to grasp what's really happening, what's really changed, and what really
matters?
…On Tue, Jan 30, 2018 at 2:54 PM, Nicolas Grekas ***@***.***> wrote:
You now need to provide the trusted headers as a bitfield, see eg
https://github.com/symfony/recipes/blob/039d2d6dd0790749f2748d952584d7
dbe39c2d4d/symfony/framework-bundle/3.3/public/index.php#L28
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#17641 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS4DQYr7pIAwgOGEGAu7DZkk07LrYmYfks5tP4F_gaJpZM4HQviU>
.
--
David Gray
http://www.wizardwrx.com/
http://www.myplacemassage.com/
|
This directly references SymfonyDocs #6197, where I originally posted it by mistake.
In this section, the documentation states:
I want to make clear that I'm not a proxy expert, but as I understand it, those headers are not standard. They're common (pseudo-standard) but not standard since the RFC 7239 was released in 2014
My points are:
TL;DR; You're not gonna read it? Then you're either a _a)_lazy or a _b)_busy person. Case a)C'mon, I made it fun and easy to read. Case b) I will probably waste your time. This is not the urgent issue you're looking for
The text was updated successfully, but these errors were encountered: