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("{}\"|<>?");
1010RegExp ( " " ) ;
1111
1212// 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
1616RegExp ( "\~\!\@\#\$\%\^\&\*\(\)\_\+" ) ; // $ Alert
1717RegExp ( "\[\]\'\\,\.\/" ) ; // $ Alert
18- RegExp ( "\{\}\\\"\|\<\>\?" ) ;
18+ RegExp ( "\{\}\\\"\|\<\>\?" ) ; // $ Alert
1919RegExp ( "\ " ) ;
2020/ \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 " / ;
2121/ \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
5757RegExp ( "a[b\.c]d" ) ; // $ Alert
5858RegExp ( "\b" ) ;
5959RegExp ( `\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
6262
6363// effective escapes
64- RegExp ( "\]" )
64+ RegExp ( "\]" ) // $ Alert
6565RegExp ( "\\]" )
6666RegExp ( "\\\]" ) ; // effectively escaped after all
6767RegExp ( "x\\\]" ) ; // effectively escaped after all
6868RegExp ( "\\\\]" )
69- RegExp ( "\\\\\]" )
69+ RegExp ( "\\\\\]" ) // $ Alert
7070RegExp ( "\\\\\\]" )
7171RegExp ( "\\\\\\\]" ) // effectively escaped after all
7272RegExp ( "\\\\\\\\]" )
73- RegExp ( "\\\\\\\\\]" )
73+ RegExp ( "\\\\\\\\\]" ) // $ Alert
You can’t perform that action at this time.
0 commit comments