-
Notifications
You must be signed in to change notification settings - Fork 8k
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
ClientIP() using X-Forwarded-For and X-Real-Ip should be opt-in #1684
Comments
There is
|
#2474 helps a bit. It's still opt-out, but you can specify trusted proxies. |
Not fixed, ffs. Lines 161 to 162 in bfc8ca2
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ClientIP()
usingX-Forwarded-For
andX-Real-Ip
by default without any kind of warning is appalling security-wise.It is trivial for an attacker to spoof any IP address if the app is listening directly on a public port without a reverse proxy or if the reverse proxy is not properly configured. For example, if the reverse proxy is configured to use
X-Real-Ip
, it will seemingly work correctly, butX-Forwarded-For
takes precedence so the remote IP address can still be spoofed.The text was updated successfully, but these errors were encountered: