-
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
Add CSRF check on login and logout #8443
Conversation
This is a minor issue and not worth a backport in my opinion as it could break more things than it's worth having it.
🚀 Test Passed. 🚀 |
@PVince81 @bantu @karlitschek The reason for this change is that an attacker may force the victim to send a crafted logout request and then a login request with the attackers credentials. A users could then be tricked to upload/modify data without knowing that he is logged into another account => the attacker is able to access this data too. |
makes sense. Can´t test at the moment 👍 |
Is there some regression testing to be done here as well ? I suppose this here might need upgrade testing as well, then ? |
Ok, it looks like this one doesn't involve cookies. |
In general it seems to work but I found a corner case:
This is because the login page tries to redirect to the "logout" URL from step 3) |
This is needed to prevent "Token expired" messages while login if a session is expired @see #8443 (comment)
@PVince81 Nice catch! - Could have created some confusions in case a session was invalidated due to timeout/whatever. I've added a commit to prevent that situation. Please review. |
🚀 Test Passed. 🚀 |
Conflicts: core/templates/login.php
rebased - tested 👍 |
The inspection completed: 4 new issues |
💣 Test Failed. 💣 |
@blizzz My 🔮 said you'd be happy to review this! |
@owncloud-bot retest this please |
💣 Test Failed. 💣 |
@owncloud-bot retest this please |
🚀 Test Passed. 🚀 |
👍 works, also works with the case mentionned in #8443 (comment) |
Add CSRF check on login and logout
This is a minor issue and not worth a backport in my opinion as it could break more things than it's worth having it.