[HIGH] security(android): clear custom headers between calls - #1138
Open
OskarEichler wants to merge 1 commit into
Open
[HIGH] security(android): clear custom headers between calls#1138OskarEichler wants to merge 1 commit into
OskarEichler wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 5487680 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
RNAppAuthModule keeps register, authorize, and token custom-header maps in module fields. parseHeaderMap previously updated only groups present in the next call. A call for provider A with a credential-bearing header followed by a call for provider B that omitted that group therefore reused and sent provider A's header to provider B. This can disclose API keys or authorization credentials across provider trust boundaries without concurrent calls.
Fix
Clear all three stored header groups before parsing every call. Each invocation now receives only the headers explicitly supplied for that invocation. This is intentionally isolated from the separate concurrent interactive-flow state fix and prefetch deadlock fix.
Breaking / observable change
Applications that accidentally relied on omitted header groups inheriting values from an earlier call must now provide those headers on every call. Reusing credential headers implicitly is unsafe.
Verification
The repository has JavaScript and Expo-plugin tests but no Android native unit-test target, so this four-line native state reset is covered by the Android compilation plus the existing regression suites rather than adding unrelated test infrastructure.
A patch changeset is included.