Skip to content

fix: correct SubjectType for origins connecting via the BackgroundBridge#9216

Merged
FrederikBolding merged 1 commit intomainfrom
fb/fix-backgroundbridge-subject-type
Apr 12, 2024
Merged

fix: correct SubjectType for origins connecting via the BackgroundBridge#9216
FrederikBolding merged 1 commit intomainfrom
fb/fix-backgroundbridge-subject-type

Conversation

@FrederikBolding
Copy link
Copy Markdown
Member

@FrederikBolding FrederikBolding commented Apr 12, 2024

Description

The SubjectType for origins connecting via the BackgroundBridge was incorrectly set to SubjectType.Snap for all origins. This PR corrects it to assuming that all origins are of type SubjectType.Website.

This is important in order to enforce that Snap-specific RPC methods don't leak into the possession of dapps.

@FrederikBolding FrederikBolding added mobile-snaps team-snaps-platform-deprecated DEPRECATED: please use "team-core-platform" instead (or "team-new-networks" for Solana snap issues) labels Apr 12, 2024
@FrederikBolding FrederikBolding requested a review from a team as a code owner April 12, 2024 13:02
@FrederikBolding FrederikBolding changed the title Fix SubjectType for origins connecting via the BackgroundBridge fix: correct SubjectType for origins connecting via the BackgroundBridge Apr 12, 2024
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Apr 12, 2024
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Copy Markdown
Contributor

@Jonathansoufer Jonathansoufer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@FrederikBolding FrederikBolding merged commit bc81a64 into main Apr 12, 2024
@FrederikBolding FrederikBolding deleted the fb/fix-backgroundbridge-subject-type branch April 12, 2024 13:23
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2024
@metamaskbot metamaskbot added the release-7.22.0 Issue or pull request that will be included in release 7.22.0 label Apr 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template mobile-snaps release-7.22.0 Issue or pull request that will be included in release 7.22.0 team-snaps-platform-deprecated DEPRECATED: please use "team-core-platform" instead (or "team-new-networks" for Solana snap issues)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants