Browse Source

Color: Fix ReDoS in setStyle

Yeting Li 4 years ago
parent
commit
35f9d33435
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/math/Color.js

+ 1 - 1
src/math/Color.js

@@ -163,7 +163,7 @@ class Color {
 
 
 		let m;
 		let m;
 
 
-		if ( m = /^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec( style ) ) {
+		if ( m = /^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec( style ) ) {
 
 
 			// rgb / hsl
 			// rgb / hsl