Skip to content

Commit 907651d

Browse files
Potential fix for code scanning alert no. 400: Inefficient regular expression
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent e430249 commit 907651d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/node/src/integrations/tracing/postgresjs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export class PostgresJsInstrumentation extends InstrumentationBase {
225225
.replace(/\s+/g, ' ')
226226
// Collapse IN and in clauses
227227
// eg. IN (?, ?, ?, ?) to IN (?)
228-
.replace(/\bIN\b\s*\((?:\s*\?\s*,?)+\)/g, 'IN (?)')
228+
.replace(/\bIN\b\s*\(\s*\?(?:\s*,\s*\?)*\s*\)/g, 'IN (?)')
229229
);
230230
}
231231
}

0 commit comments

Comments
 (0)