Blame SOURCES/0002-Fix-ReDoS-for-data-URLs.patch

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