Repository navigation
fix(auth): allow email login with app password created via uid login - #66542
Draft
juliusknorr wants to merge 1 commit into
Draft
juliusknorr wants to merge 1 commit into
juliusknorr wants to merge 1 commit into
Conversation
Clients logging in with the account's email address and an app password created in a session with the user id (e.g. SSO) were rejected. Accept the token owner's email when the token login name is the uid and log in with the token's own login name. Also stops the fallback from reporting a login that never happened when the token login name is the email. Co-authored-by: Wouter Haffmans <wouter@simply-life.net> Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
This branch has not been deployed
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
Clients logging in with the account's email and an app password are rejected with
App token login name does not matchwhen the app password was created after a login with the user id, which is common with SSO.The token branch of
logClientInnow accepts the email if it belongs to the token owner (case-insensitive) and the token's login name is the uid. It then logs in with the token's own login name, so all token checks still apply. Other login names stay strict, another user's email is rejected, and there's nogetByEmail()lookup.This also fixes the fallback returning true without logging in when an email token's credentials were outdated (503 instead of 401 in DAV).
Accepting the owner's email is safe: the check comes from owncloud/core#25154 to keep clients from using arbitrary names, and after a token login only the token's stored login name is used (session,
LoginCredentials\Store, events).TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)