[HIGH] security(android): isolate interactive request state - #1139
Open
OskarEichler wants to merge 1 commit into
Open
[HIGH] security(android): isolate interactive request state#1139OskarEichler wants to merge 1 commit into
OskarEichler wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 4cfcd67 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@OskarEichler is attempting to deploy a commit to the Nearform Team on Vercel. A member of the Team first needs to authorize it. |
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.
Security impact
Android stores the active Promise, client secret, client-auth method, token headers, PKCE verifier, TLS policy, timeout, and token parameters in module-wide mutable fields. While an authorize flow is waiting for the browser, another authorize, logout, refresh, or registration call can replace that state. The first callback can then exchange its authorization code using another provider's credentials or headers and can settle the wrong Promise. In multi-provider applications this can disclose client credentials across provider trust boundaries and mix authentication results between callers.
Fix
This PR is limited to concurrent interactive-flow state. Sequential stale-header reuse and the prefetch deadlock are submitted separately.
Breaking / observable changes
A second authorize or logout call while another browser flow is pending now rejects with authentication_in_progress instead of corrupting the first flow. Callers that intentionally started overlapping browser flows must serialize them.
Verification
The repository has no Android native unit-test target; the fix is verified through the actual Android compilation and existing project suites rather than introducing a new native test framework in this focused patch.
A patch changeset and public error-code type are included. This supersedes only the request-state portion of #1128.