[ES|QL] Fixes regex scan alert (#214443)

## Summary

Fixes https://github.com/elastic/kibana-team/issues/1561
This commit is contained in:
Stratoula Kalafateli 2025-03-17 10:55:30 +01:00 committed by GitHub
parent a9352bb572
commit 121563dedf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -66,7 +66,7 @@ export const useDebounceWithOptions = (
// Quotes can be used as separators for multiple warnings unless
// they are escaped with backslashes. This regexp will match any
// quoted string that is not escaped.
const quotedWarningMessageRegexp = /"(?:[^"\\]*(?:\\.[^"\\]*)*)"/g;
const quotedWarningMessageRegexp = /"[^"\\]*(?:\\.[^"\\]*)*?"/g;
export const parseWarning = (warning: string): MonacoMessage[] => {
if (quotedWarningMessageRegexp.test(warning)) {