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

Expired CSRF token results in "Forbidden" on login attempt #4593

Closed
BenLubar opened this issue May 3, 2016 · 2 comments
Closed

Expired CSRF token results in "Forbidden" on login attempt #4593

BenLubar opened this issue May 3, 2016 · 2 comments
Assignees
Labels
Milestone

Comments

@BenLubar
Copy link
Contributor

BenLubar commented May 3, 2016


It should probably re-obtain the CSRF token and silently try again, or at least give a message along the lines of "please refresh the page".

@BenLubar
Copy link
Contributor Author

BenLubar commented May 3, 2016

This can be verified by deleting the session cookie while on the login page and then attempting to log in without navigating away.

@julianlam
Copy link
Member

julianlam commented May 9, 2016

Unfortunately, we cannot re-obtain the CSRF token in the background, since that would be opening up a vector to retrieve a CSRF token via API, which is verboten...

I also hate filling out forms and then seeing the "ok, something went sideways, fill this form again", but it just might be the only solution here.

Edit: ... also we cannot detect whether a CSRF token is valid until after the request returns.

Edit 2: ... well, we can, but it also happens to use up the CSRF token 😛

@julianlam julianlam self-assigned this May 9, 2016
@julianlam julianlam added this to the 1.1.0 milestone May 9, 2016
@julianlam julianlam added the bug label May 9, 2016
julianlam added a commit that referenced this issue May 11, 2016
Error message was always the CSRF message, even when it wasn't
a CSRF issue. re: #4593
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants