Backoffice Login: Redact back-office PKCE codes from the server#20847
Merged
kjac merged 2 commits intorelease/17.0from Nov 17, 2025
Merged
Backoffice Login: Redact back-office PKCE codes from the server#20847kjac merged 2 commits intorelease/17.0from
kjac merged 2 commits intorelease/17.0from
Conversation
AndyButland
approved these changes
Nov 17, 2025
Contributor
AndyButland
left a comment
There was a problem hiding this comment.
Looks good and works as expected - the code previously visible in the request payload is redacted, and the backoffice login continues to "just work".
src/Umbraco.Cms.Api.Common/DependencyInjection/HideBackOfficeTokensHandler.cs
Outdated
Show resolved
Hide resolved
kjac
added a commit
that referenced
this pull request
Nov 17, 2025
* Redact back-office PKCE codes from the server * Update src/Umbraco.Cms.Api.Common/DependencyInjection/HideBackOfficeTokensHandler.cs --------- Co-authored-by: Andy Butland <abutland73@gmail.com>
1 task
kjac
added a commit
that referenced
this pull request
Nov 17, 2025
Redact back-office PKCE codes from the server (#20847) * Redact back-office PKCE codes from the server * Update src/Umbraco.Cms.Api.Common/DependencyInjection/HideBackOfficeTokensHandler.cs --------- Co-authored-by: Andy Butland <abutland73@gmail.com>
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.
Prerequisites
Description
This is a continuation of #20820. It redacts PKCE codes to prevent malicious JS from intercepting and misusing the PKCE flow.
A correct PKCE code from the server, in conjunction with the matching code verifier from the client, can be used to obtain access and refresh tokens. Granted, #20820 moves these tokens to cookies, so this cannot happen in a browser. But consider this scenario:
Testing this PR
First and foremost, the back-office should "just work" as per usual.
The initial PKCE code exchange should list a redacted PKCE code: