-
Notifications
You must be signed in to change notification settings - Fork 96
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
Mitigate Host Header Attacks #78
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The X-Forwarded-Host HTTP header is always trusted and is used in url_for: rails/rails#29893
Mitigations to consider:
default_url_options[:host]
andasset_host
as described in https://github.com/ankane/secure_rails#host-header-injection. Note this is only a partial mitigation according to other reports.StripXForwardedHost
middleware in The X-Forwarded-Host HTTP header is always trusted and is used in url_for rails/rails#29893 (comment))(If using a rack middleware, one approach to testing this in a request spec: rspec/rspec-rails#1596 (comment))
The text was updated successfully, but these errors were encountered: