Skip to content

Commit a53b6f2

Browse files
Sushant Mittalxzyfer
Sushant Mittal
authored andcommitted
Fixed ReDoS in 'loadAnnotation' function of previous-map.js.
1 parent b55257b commit a53b6f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/previous-map.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default class PreviousMap {
3131
}
3232

3333
loadAnnotation(css) {
34-
let match = css.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//);
34+
let match = css.match(/\/\*\s*# sourceMappingURL=((?:(?!sourceMappingURL=).)*)\s*\*\//);
3535
if ( match ) this.annotation = match[1].trim();
3636
}
3737

0 commit comments

Comments
 (0)