Skip to content
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

CSRF protection for web forms #570

Merged
merged 1 commit into from
Oct 11, 2017
Merged

Conversation

defect
Copy link
Contributor

@defect defect commented Oct 11, 2017

This adds protection from CSRF attacks by adding a token check to non-API endpoints. Currently, if an attacker can guess (or bruteforce) the asset tags of nodes he or she would be able to create assets, decommission assets, put assets in maintenance, etc. by getting a logged in user to visit a webpage. Depending on the type of automation and asset tags in the installation this could obviously be very bad.

This only applies to routes using session authentication and not the API since it is protected by basic authentication. Furthermore, only the login and create resource forms actually have the CSRF token in a hidden input tag since the other forms submit their data through XHR.

We will post a nginx-based workaround on the mailing list, but recommend users to update collins as well. I will publish a new release (2.2.0) once this is merged.

@tumblr/collins

@defect defect merged commit 9b29ab4 into tumblr:master Oct 11, 2017
Copy link
Contributor

@byxorna byxorna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

posthumous 🍕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants