Repository navigation
[stable35] fix(auth): accept a percent-encoded login name for app password logins - #66433
Open
backportbot[bot] wants to merge 1 commit into
Open
backportbot[bot] wants to merge 1 commit into
backportbot[bot] wants to merge 1 commit into
Conversation
Some clients percent-encode the login name before putting it into the Authorization header, so an account called "user@example.com" arrives as "user%40example.com". It then no longer matches the login name the app password was created with and every request is rejected with "App token login name does not match", even though the app password itself is correct. iOS 18.4 started doing this for CalDAV/CardDAV accounts, which is why a setup that had worked for a year suddenly stopped. Keep the exact comparison as the first and only check on the happy path, and decode once before giving up. rawurldecode and not urldecode: a "+" in a login name is a literal plus sign here, not an encoded space. An unrelated login name still fails, and a login name that merely belongs to the same account (the e-mail versus user id case in the TODO) is still rejected - this only recognises the same name in encoded form. Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: Tor Valstrom <51440386+torvalstrom@users.noreply.github.com>
backportbot
Bot
requested review from
Altahrim and
come-nc
and removed request for
a team
November 6, 2026 20:46
artonge
approved these changes
Nov 10, 2026
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.
Backport of PR #64324