mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-25 17:25:57 +03:00
[GH-ISSUE #303] ignoring X-Forwarded-For headers? #163
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#163
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tycho on GitHub (Dec 17, 2018).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/303
I notice that when using a reverse proxy, bitwarden_rs logs the wrong IP address:
[2018-12-17][09:47:45][bitwarden_rs::api::identity][ERROR] Username or password is incorrect. Try again. IP: 127.0.0.1. Username: ...This is especially sloppy looking since that error message gets surfaced to the user on the web vault.
My reverse proxy is setting the
X-Forwarded-Forheader, but it seems that bitwarden_rs doesn't pay attention to that when determining the client IP?@dani-garcia commented on GitHub (Dec 17, 2018):
Rocket uses
X-Real-IPfor retrieving the clients IP address, instead ofX-Forwarded-For.The error message comes from a time where we didn't have any decent logging in place, but it could be changed now to hide that info from the user.
@tycho commented on GitHub (Dec 17, 2018):
Yep, I switched to
X-Real-IPand that works! Thanks!@tycho commented on GitHub (Dec 17, 2018):
Oh, maybe the
PROXY.mdshould make mention of theX-Real-IPthing. Here's what I did for nginx:@dani-garcia commented on GitHub (Dec 17, 2018):
True, I use Caddy which does this by default, so I didn't know. What do you think of adding these (to be equivalent with what Caddy sends)?
@tycho commented on GitHub (Dec 17, 2018):
Seems reasonable to me!