Explorar o código

Color: Fix ReDoS in setStyle

Yeting Li %!s(int64=5) %!d(string=hai) anos
pai
achega
35f9d33435
Modificáronse 1 ficheiros con 1 adicións e 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
 

粤ICP备19079148号