Skip to content

Commit 81d3c4a

Browse files
committed
fix: regex vulnerability causing quality gate failure
1 parent 0219af1 commit 81d3c4a

File tree

1 file changed

+2
-1
lines changed
  • src/extensionsIntegrated/CSSColorPreview

1 file changed

+2
-1
lines changed

src/extensionsIntegrated/CSSColorPreview/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ define(function (require, exports, module) {
7777
if ((lineText.indexOf('/*') !== -1) || (lineText.indexOf('*/') !== -1)) {
7878
continue;
7979
} else {
80-
let regx = /:.*?;/g;
80+
let regx = /:[^;]*;/g;
81+
8182
lineText = lineText.match(regx);
8283
if (lineText) {
8384
let tempColors = lineText[0].match(COLOR_REGEX);

0 commit comments

Comments
 (0)