Distinguish 'done' from 'configuring' in 2FA#39411
Open
mrvahedi68 wants to merge 2 commits intonextcloud:masterfrom
Open
Distinguish 'done' from 'configuring' in 2FA#39411mrvahedi68 wants to merge 2 commits intonextcloud:masterfrom
mrvahedi68 wants to merge 2 commits intonextcloud:masterfrom
Conversation
7 tasks
5 tasks
This was referenced Jul 18, 2023
thepeak99
approved these changes
Jul 19, 2023
Contributor
|
Can someone review this please? |
Contributor
|
Is there anything blocking the merge of this? It would be great if this could be merged. |
Member
|
See the open todos in the PR description |
Member
|
For the tests: let's also add one that tests the change of session data IDs during an authentication. That can happen when an instance is upgraded in the middle of a user's authentication attempt. |
Merged
Contributor
|
Hello @michielbdejong, I'm reopening your PR and requesting reviews! :) Is there anything left blocking you? We'd like to help you get this one in! |
This was referenced Aug 22, 2025
Merged
Merged
Merged
Merged
Merged
This was referenced Sep 25, 2025
Merged
Merged
Merged
This was referenced Jan 29, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When there is a token in the session for which the user is still setting up 2FA, setting
self::SESSION_UID_DONE("two_factor_auth_passed") is a misnomer.AFAICT, everything works fine if you set nothing into the session and just return 'false' from this if-statement, but in case there is some code (now or in the future) that needs to know if the user is configuring 2FA, to play it safe I would suggest storing
self::SESSION_UID_CONFIGURING("two_factor_auth_configuring") into the session.TODO
Checklist