70664d
From 8fc20d21cd7861ecc4f034ae82234a05227c2c12 Mon Sep 17 00:00:00 2001
5ce267
From: rpm-build <rpm-build>
5ce267
Date: Thu, 9 Dec 2021 15:48:46 +0100
5ce267
Subject: [PATCH] deps(ansi-regex): fix potential ReDoS
5ce267
5ce267
This is the upstream fix [1] applied to all applicable bundled deps.
5ce267
5ce267
[1]: https://github.com/chalk/ansi-regex/commit/8d1d7cdb586269882c4bdc1b7325d0c58c8f76f9
5ce267
5ce267
Fixes: CVE-2021-3807
5ce267
Signed-off-by: rpm-build <rpm-build>
5ce267
---
5ce267
 .../node_modules/string-width/node_modules/ansi-regex/index.js  | 2 +-
5ce267
 deps/npm/node_modules/yargs/node_modules/ansi-regex/index.js    | 2 +-
d23149
 2 files changed, 2 insertions(+), 2 deletions(-)
5ce267
5ce267
diff --git a/deps/npm/node_modules/string-width/node_modules/ansi-regex/index.js b/deps/npm/node_modules/string-width/node_modules/ansi-regex/index.js
5ce267
index c4aaecf..7d32201 100644
5ce267
--- a/deps/npm/node_modules/string-width/node_modules/ansi-regex/index.js
5ce267
+++ b/deps/npm/node_modules/string-width/node_modules/ansi-regex/index.js
5ce267
@@ -2,7 +2,7 @@
5ce267
 
5ce267
 module.exports = () => {
5ce267
 	const pattern = [
5ce267
-		'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)',
5ce267
+		'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
5ce267
 		'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
5ce267
 	].join('|');
5ce267
 
5ce267
diff --git a/deps/npm/node_modules/yargs/node_modules/ansi-regex/index.js b/deps/npm/node_modules/yargs/node_modules/ansi-regex/index.js
5ce267
index c254480..9e37ec3 100644
5ce267
--- a/deps/npm/node_modules/yargs/node_modules/ansi-regex/index.js
5ce267
+++ b/deps/npm/node_modules/yargs/node_modules/ansi-regex/index.js
5ce267
@@ -6,7 +6,7 @@ module.exports = options => {
5ce267
 	}, options);
5ce267
 
5ce267
 	const pattern = [
5ce267
-		'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
5ce267
+		'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
5ce267
 		'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
5ce267
 	].join('|');
5ce267
 
5ce267
-- 
70664d
2.38.1
5ce267