Skip to content

Commit 777f432

Browse files
committed
fix github-advanced-security rule violation: js/polynomial-redos (Polynomial regular expression used on uncontrolled data)
1 parent 395ce53 commit 777f432

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/search/SearchRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ export class SearchRequest {
419419
static extractQuotedStrings = (searchText: string): string[] => {
420420
// based on code generated by gemini
421421
// Regex to find tokens: quoted strings with escaped quotes, or unquoted words.
422-
const regex = /"(?:[^"\\]|\\.)+"|[^\s]+/g;
422+
const regex = /"(?:[^"\\]|\\.)+"|[\S]+/g
423423
// const regex = /"([^"]*)"/g;
424424
const matches = searchText.match(regex);
425425
return matches ?? [];

0 commit comments

Comments
 (0)