Sfoglia il codice sorgente

Color: Fix ReDoS in setStyle

Yeting Li 5 anni fa
parent
commit
35f9d33435
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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号