Support optional RE2J regex engine for CSS selectors to prevent ReDoS
Support optional RE2J regex engine for CSS selectors to prevent ReDoS: a task in LegoFlow-SWE (Harbor dataset). The CSS selector engine currently uses Java’s default java.util.regex.Pattern for queries such as attr~=pattern , :matches(text) , :matchesOwn(text) , :matchesWholeText(text) , and…
The task
The CSS selector engine currently uses Java’s default `java.util.regex.Pattern` for queries such as `[attr~=pattern]`, `:matches(text)`, `:matchesOwn(text)`, `:matchesWholeText(text)`, and `:matchesWholeOwnText(text)`. Because the default engine is backtracking, user-supplied patterns can cause **ReDoS** (Regular…
Part of Lego-X/LegoFlow-SWE.