-
Notifications
You must be signed in to change notification settings - Fork 663
Demos test helper: fix regular expression injection #32106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Demos test helper: fix regular expression injection #32106
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request fixes a regular expression injection vulnerability in the demos test helper by properly escaping special characters before using user input to construct regular expressions.
Key changes:
- Added
escapeRegExpfunction to sanitize input strings - Modified the
wrapfunction to escape strings before passing them toRegExpconstructor
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: EugeniyKiyashko <EugeniyKiyashko@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Signed-off-by: EugeniyKiyashko <EugeniyKiyashko@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.