You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A header like X-Forwarded-For should only be taken into account if the request comes over the network from the allowed so-called "trusted proxies" IP ranges. But I don't see any work and configuration of such allowed IP ranges in this code. In that case, anyone could substitute any other IP address with the header and thus bypass some protections or other functionalities tied to the IP address.
A header like X-Forwarded-For should only be taken into account if the request comes over the network from the allowed so-called "trusted proxies" IP ranges. But I don't see any work and configuration of such allowed IP ranges in this code. In that case, anyone could substitute any other IP address with the header and thus bypass some protections or other functionalities tied to the IP address.
I think Nginx handles this correctly, but this is definitely still a security consideration. Most other apps handle this with a trusted proxy configuration with CIDR ranges if I recall, which should be the proper solution here!
@checkraisefold, @janreges, thanks for flagging this. I see the error, and we will fix it for the reverse proxy as well. The IP rate limiting and other security-based checks are handled by Django internally, so it is not a security issue right now.
Is there an existing issue for this?
Current behavior
Currently, existing code fetches the client IP with
REMOTE_ADDR
from the request metadata. This is incorrect behind a reverse proxy.Code exists to use X-Forwarded-For, but it is entirely unused.
plane/apiserver/plane/utils/ip_address.py
Lines 1 to 7 in 9ee1d8c
Steps to reproduce
last_login_ip
; it will not match the sent X-Forwarded-For headerEnvironment
Production
Browser
Mozilla Firefox
Variant
Self-hosted
Version
v0.25.1
The text was updated successfully, but these errors were encountered: