1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
From: =?utf-8?q?Bastien_Roucari=C3=A8s?= <rouca@debian.org>
Date: Mon, 12 May 2025 00:58:29 +0200
Subject: CVE-2023-26116
Fix the redos by using regex.flags available since 2020 for all browser
bug: https://security.snyk.io/vuln/SNYK-JS-ANGULAR-3373044
origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1036694
---
src/Angular.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Angular.js b/src/Angular.js
index 9b11090..79f4a95 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -999,7 +999,7 @@ function copy(source, destination, maxDepth) {
return new source.constructor(source.valueOf());
case '[object RegExp]':
- var re = new RegExp(source.source, source.toString().match(/[^/]*$/)[0]);
+ var re = new RegExp(source.source, source.flags);
re.lastIndex = source.lastIndex;
return re;
|