Blame SOURCES/0002-Fix-ReDoS-for-data-URLs.patch
|
|
df7ce9 |
From f3fa3bb4248f851be3cb6adc1beaf68711848ff3 Mon Sep 17 00:00:00 2001
|
|
|
df7ce9 |
From: rpm-build <rpm-build>
|
|
|
df7ce9 |
Date: Fri, 2 Jul 2021 16:30:14 +0200
|
|
|
df7ce9 |
Subject: [PATCH] Fix ReDoS for data URLs
|
|
|
df7ce9 |
|
|
|
df7ce9 |
Backported from
|
|
|
df7ce9 |
https://github.com/sindresorhus/normalize-url/commit/b1fdb5120b6d27a88400d8800e67ff5a22bd2103
|
|
|
df7ce9 |
|
|
|
df7ce9 |
Signed-off-by: rpm-build <rpm-build>
|
|
|
df7ce9 |
---
|
|
|
df7ce9 |
node_modules/got/node_modules/normalize-url/index.js | 2 +-
|
|
|
df7ce9 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
df7ce9 |
|
|
|
df7ce9 |
diff --git a/node_modules/got/node_modules/normalize-url/index.js b/node_modules/got/node_modules/normalize-url/index.js
|
|
|
df7ce9 |
index 4eea255..2ab7f57 100644
|
|
|
df7ce9 |
--- a/node_modules/got/node_modules/normalize-url/index.js
|
|
|
df7ce9 |
+++ b/node_modules/got/node_modules/normalize-url/index.js
|
|
|
df7ce9 |
@@ -11,7 +11,7 @@ const testParameter = (name, filters) => {
|
|
|
df7ce9 |
};
|
|
|
df7ce9 |
|
|
|
df7ce9 |
const normalizeDataURL = (urlString, {stripHash}) => {
|
|
|
df7ce9 |
- const parts = urlString.match(/^data:(.*?),(.*?)(?:#(.*))?$/);
|
|
|
df7ce9 |
+ const parts = urlString.match(/^data:([^,]*?),([^#]*?)(?:#(.*))?$/);
|
|
|
df7ce9 |
|
|
|
df7ce9 |
if (!parts) {
|
|
|
df7ce9 |
throw new Error(`Invalid URL: ${urlString}`);
|
|
|
df7ce9 |
--
|
|
|
df7ce9 |
2.31.1
|
|
|
df7ce9 |
|