File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
javascript/ql/test/library-tests/TaintTracking Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 3737| exceptions.js:93:11:93:18 | source() | exceptions.js:95:10:95:10 | e |
3838| exceptions.js:100:13:100:20 | source() | exceptions.js:102:12:102:12 | e |
3939| exceptions.js:115:21:115:28 | source() | exceptions.js:121:10:121:10 | e |
40+ | exceptions.js:144:9:144:16 | source() | exceptions.js:129:10:129:10 | e |
41+ | exceptions.js:144:9:144:16 | source() | exceptions.js:132:8:132:27 | returnThrownSource() |
4042| indexOf.js:4:11:4:18 | source() | indexOf.js:9:10:9:10 | x |
4143| partialCalls.js:4:17:4:24 | source() | partialCalls.js:17:14:17:14 | x |
4244| partialCalls.js:4:17:4:24 | source() | partialCalls.js:20:14:20:14 | y |
Original file line number Diff line number Diff line change @@ -122,4 +122,26 @@ function testNesting(x) {
122122 }
123123}
124124
125+ function testThrowSourceInCallee ( ) {
126+ try {
127+ throwSource ( ) ;
128+ } catch ( e ) {
129+ sink ( e ) ; // NOT OK
130+ }
131+
132+ sink ( returnThrownSource ( ) ) ; // NOT OK
133+ }
134+
135+ function returnThrownSource ( ) {
136+ try {
137+ throwSource ( ) ;
138+ } catch ( e ) {
139+ return e ;
140+ }
141+ }
142+
143+ function throwSource ( ) {
144+ throw source ( ) ;
145+ }
146+
125147// semmle-extractor-options: --experimental
You can’t perform that action at this time.
0 commit comments