Explorar el Código

Color: Fix ReDoS in setStyle

Yeting Li hace 4 años
padre
commit
35f9d33435
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/math/Color.js

+ 1 - 1
src/math/Color.js

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