-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Patch security issue in snaps-utils (#25827)
## **Description** This is the same as #25823, but targeting `develop` instead of `Version-v12.0.0`. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25827?quickstart=1)
- Loading branch information
Showing
3 changed files
with
68 additions
and
4 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
.yarn/patches/@metamask-snaps-utils-npm-7.7.0-2cc1f044af.patch
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
diff --git a/dist/chunk-37VHIRUJ.js b/dist/chunk-37VHIRUJ.js | ||
index a909a4ef20305665a07db5c25b4a9ff7eb0a447e..98dd75bf33a9716dc6cca96a38d184645f6ec033 100644 | ||
--- a/dist/chunk-37VHIRUJ.js | ||
+++ b/dist/chunk-37VHIRUJ.js | ||
@@ -53,8 +53,8 @@ function assertIsKeyringOrigins(value, ErrorWrapper) { | ||
} | ||
function createOriginRegExp(matcher) { | ||
const escaped = matcher.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&"); | ||
- const regex = escaped.replace(/\*/gu, ".*"); | ||
- return RegExp(regex, "u"); | ||
+ const regex = escaped.replace(/\\\*/gu, '.*'); | ||
+ return RegExp(`${regex}$`, 'u'); | ||
} | ||
function checkAllowedOrigin(matcher, origin) { | ||
if (matcher === "*" || matcher === origin) { | ||
diff --git a/dist/chunk-K2OTEZZZ.mjs b/dist/chunk-K2OTEZZZ.mjs | ||
index 15be5da7563a5bdf464d7e9c28ed6f04863e378a..7f38bf328e71c1feb2b8850ba050ce9e55801668 100644 | ||
--- a/dist/chunk-K2OTEZZZ.mjs | ||
+++ b/dist/chunk-K2OTEZZZ.mjs | ||
@@ -53,8 +53,8 @@ function assertIsKeyringOrigins(value, ErrorWrapper) { | ||
} | ||
function createOriginRegExp(matcher) { | ||
const escaped = matcher.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&"); | ||
- const regex = escaped.replace(/\*/gu, ".*"); | ||
- return RegExp(regex, "u"); | ||
+ const regex = escaped.replace(/\\\*/gu, '.*'); | ||
+ return RegExp(`${regex}$`, 'u'); | ||
} | ||
function checkAllowedOrigin(matcher, origin) { | ||
if (matcher === "*" || matcher === origin) { |
This file contains 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
This file contains 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