use toUnicode in ReDoSUtil.qll

This commit is contained in:
Erik Krogh Kristensen
2021-08-25 14:54:09 +02:00
parent 039b655f7f
commit 0cc19d914e
2 changed files with 2 additions and 12 deletions

View File

@@ -422,12 +422,7 @@ private module CharacterClasses {
char = "0123456789".charAt(_)
or
clazz = "s" and
(
char = [" ", "\t", "\r", "\n"]
or
char = getARelevantChar() and
char.regexpMatch("\\u000b|\\u000c") // \v|\f (vertical tab | form feed)
)
char = [" ", "\t", "\r", "\n", 11.toUnicode(), 12.toUnicode()] // 11.toUnicode() = \v, 12.toUnicode() = \f
or
clazz = "w" and
char = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_".charAt(_)