File: CVE-2023-26116.patch

package info (click to toggle)
angular.js 1.8.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 46,680 kB
  • sloc: javascript: 232,261; sh: 703; pascal: 164; makefile: 139; xml: 6
file content (25 lines) | stat: -rw-r--r-- 877 bytes parent folder | download
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;