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

[PROJQUAY-917] Fix CSRF token encoding #500

Merged
merged 1 commit into from Jul 31, 2020
Merged

[PROJQUAY-917] Fix CSRF token encoding #500

merged 1 commit into from Jul 31, 2020

Conversation

kurtismullins
Copy link
Contributor

@kurtismullins kurtismullins commented Jul 30, 2020

Issue: https://issues.redhat.com/browse/PROJQUAY-917

Changelog: Fix CSRF token encoding in Python 3

Docs: n/a

Testing: Using any form in the UI, such as creating a User, should no longer fail with a CSRF token error.

Details: The CSRF token is being encoded in a way that causes the front-end to incorrectly escape certain sequences contained within the token. This causes CSRF validation to fail as the token created by the back-end and stored in the session does not match what is sent by the browser. This change fixes that issue.

endpoints/csrf.py Outdated Show resolved Hide resolved
Copy link
Contributor

@josephschorr josephschorr left a comment

Choose a reason for hiding this comment

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

LGTM

@kurtismullins kurtismullins merged commit d3ca550 into quay:master Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants