File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
javascript/ql/test/library-tests/TaintTracking Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 3434| exceptions.js:88:6:88:13 | source() | exceptions.js:33:10:33:21 | e.toString() |
3535| exceptions.js:88:6:88:13 | source() | exceptions.js:34:10:34:18 | e.message |
3636| exceptions.js:88:6:88:13 | source() | exceptions.js:35:10:35:19 | e.fileName |
37+ | exceptions.js:93:11:93:18 | source() | exceptions.js:95:10:95:10 | e |
38+ | exceptions.js:100:13:100:20 | source() | exceptions.js:102:12:102:12 | e |
39+ | exceptions.js:115:21:115:28 | source() | exceptions.js:121:10:121:10 | e |
3740| indexOf.js:4:11:4:18 | source() | indexOf.js:9:10:9:10 | x |
3841| partialCalls.js:4:17:4:24 | source() | partialCalls.js:17:14:17:14 | x |
3942| partialCalls.js:4:17:4:24 | source() | partialCalls.js:20:14:20:14 | y |
Original file line number Diff line number Diff line change @@ -88,4 +88,38 @@ async function throwAsync(x) {
8888test ( source ( ) , "hello" ) ;
8989test ( "hey" , "hello" ) ; // no single-call inlining
9090
91+ function testNesting ( x ) {
92+ try {
93+ throw source ( ) ;
94+ } catch ( e ) {
95+ sink ( e ) ; // NOT OK
96+ }
97+
98+ try {
99+ try {
100+ throw source ( ) ;
101+ } catch ( e ) {
102+ sink ( e ) ; // NOT OK
103+ }
104+ } catch ( e ) {
105+ sink ( e ) ; // OK - not caught by this catch
106+ }
107+
108+ try {
109+ if ( x ) {
110+ for ( ; x ; ) {
111+ while ( x ) {
112+ switch ( x ) {
113+ case 1 :
114+ default :
115+ throw source ( ) ;
116+ }
117+ }
118+ }
119+ }
120+ } catch ( e ) {
121+ sink ( e ) ; // NOT OK
122+ }
123+ }
124+
91125// semmle-extractor-options: --experimental
You can’t perform that action at this time.
0 commit comments