File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
javascript/ql/test/query-tests/Security/CWE-020/UselessCharacterEscape Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,12 @@ RegExp("{}\"|<>?");
10
10
RegExp ( " " ) ;
11
11
12
12
// backslashes
13
- RegExp ( "\a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\\u\v\\x\y\z" ) ;
14
- RegExp ( "\A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\X\Y\Z" ) ;
15
- RegExp ( "\`\1\2\3\4\5\6\7\8\9\0\-\=" ) ;
13
+ RegExp ( "\a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\\u\v\\x\y\z" ) ; // $ Alert
14
+ RegExp ( "\A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\X\Y\Z" ) ; // $ Alert
15
+ RegExp ( "\`\1\2\3\4\5\6\7\8\9\0\-\=" ) ; // $ Alert
16
16
RegExp ( "\~\!\@\#\$\%\^\&\*\(\)\_\+" ) ; // $ Alert
17
17
RegExp ( "\[\]\'\\,\.\/" ) ; // $ Alert
18
- RegExp ( "\{\}\\\"\|\<\>\?" ) ;
18
+ RegExp ( "\{\}\\\"\|\<\>\?" ) ; // $ Alert
19
19
RegExp ( "\ " ) ;
20
20
/ \a \b \c \d \e \f \g \h \i \j \k\l \m \n \o \p\q \r \s \t \u \v \\ x \y \z " / ;
21
21
/ \A \B \C \D \E \F \G \H \I \J \K \L \M \N \O \P\Q \R \S \T \U \V \X \Y \Z / ;
@@ -57,17 +57,17 @@ RegExp("[\.]"); // $ Alert
57
57
RegExp ( "a[b\.c]d" ) ; // $ Alert
58
58
RegExp ( "\b" ) ;
59
59
RegExp ( `\b` ) ;
60
- RegExp ( `\k\\k\d\\d` )
61
- RegExp ( `\k\\k${ foo } \d\\d` )
60
+ RegExp ( `\k\\k\d\\d` ) // $ Alert
61
+ RegExp ( `\k\\k${ foo } \d\\d` ) // $ Alert
62
62
63
63
// effective escapes
64
- RegExp ( "\]" )
64
+ RegExp ( "\]" ) // $ Alert
65
65
RegExp ( "\\]" )
66
66
RegExp ( "\\\]" ) ; // effectively escaped after all
67
67
RegExp ( "x\\\]" ) ; // effectively escaped after all
68
68
RegExp ( "\\\\]" )
69
- RegExp ( "\\\\\]" )
69
+ RegExp ( "\\\\\]" ) // $ Alert
70
70
RegExp ( "\\\\\\]" )
71
71
RegExp ( "\\\\\\\]" ) // effectively escaped after all
72
72
RegExp ( "\\\\\\\\]" )
73
- RegExp ( "\\\\\\\\\]" )
73
+ RegExp ( "\\\\\\\\\]" ) // $ Alert
You can’t perform that action at this time.
0 commit comments