Merge pull request #13283 from asgerf/js/restrict-regex-search-function

JS: Be more conservative about flagging "search" call arguments as regex
This commit is contained in:
Asger F
2023-06-08 10:50:51 +02:00
committed by GitHub
7 changed files with 58 additions and 36 deletions

View File

@@ -0,0 +1,6 @@
---
category: minorAnalysis
---
* Fixed an issue where calls to a method named `search` would lead to false positive alerts related to regular expressions.
This happened when the call was incorrectly seen as a call to `String.prototype.search`, since this function converts its first argument
to a regular expression. The analysis is now more restrictive about when to treat `search` calls as regular expression sinks.