Skip to content

Commit

Permalink
fix: regex vulnerability causing quality gate failure
Browse files Browse the repository at this point in the history
  • Loading branch information
devvaannsh authored and abose committed Nov 30, 2024
1 parent d688c3c commit 4689eda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/extensionsIntegrated/CSSColorPreview/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ define(function (require, exports, module) {
if ((lineText.indexOf('/*') !== -1) || (lineText.indexOf('*/') !== -1)) {
continue;
} else {
let regx = /:.*?;/g;
let regx = /:[^;]*;/g;

lineText = lineText.match(regx);
if (lineText) {
let tempColors = lineText[0].match(COLOR_REGEX);
Expand Down

0 comments on commit 4689eda

Please sign in to comment.