-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Redisplay login page in case of CSRF error #29462
Comments
We could also add when the csrf error appears where to manually redirect to the login webpage by clicking somewhere in the message. |
in case the redirect does not work, users could always force it. |
Ok good point. Other pages have a text saying: "Redirecting to login page in 5 sec. If it does not work, click here" |
and now that we all agree... when would be that done? |
Assigning to @VicDeo for 10.0.5. Let's hope it's not too complicated as it might require editing or hacking the base templates... |
@PVince81 Would it be enough to redisplay the login page with "You took too long to login, please try again now" at once without any kind of redirect as this is much simpler?
Otherwise I need to write a JS code with redirect and pass it to the template using the same conditions as above, but it could be slightly more tricky. |
I like your PHP approach better than JS hackery. |
Done for 10.0.5 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
A CSRF token can expire if one leaves the login page open for several days.
The PHP session containing the old token would expire, so logging in there would cause a token mismatch.
Currently the page is a full page error with no easy way to go back.
We should change this and detect whenever the CSRF error is from the login page, then simply redisplay the login page with a more user friendly message like "You took too long to login, please try again now".
The "CSRF error" page can be kept for other kinds of errors.
cc @pmaier1 @settermjd
The text was updated successfully, but these errors were encountered: