Skip to content

Commit c0d848c

Browse files
committed
Added support for getUri.
1 parent f48a362 commit c0d848c

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ module ClientRequest {
222222
method = "request"
223223
or
224224
this = axios().getMember(method).getACall() and
225-
method = [httpMethodName(), "request", "postForm", "putForm", "patchForm"]
225+
method = [httpMethodName(), "request", "postForm", "putForm", "patchForm", "getUri"]
226226
}
227227

228228
private int getOptionsArgIndex() {

javascript/ql/test/library-tests/frameworks/ClientRequests/ClientRequests.expected

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ test_ClientRequest
108108
| tst.js:346:5:346:36 | axios.p ... config) |
109109
| tst.js:347:5:347:30 | axios.p ... , data) |
110110
| tst.js:348:5:348:38 | axios.p ... config) |
111+
| tst.js:349:5:349:30 | axios.g ... url }) |
111112
test_getADataNode
112113
| axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:15:18:15:55 | { 'Cont ... json' } |
113114
| axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:16:15:16:35 | {x: 'te ... 'test'} |
@@ -283,6 +284,7 @@ test_getUrl
283284
| tst.js:346:5:346:36 | axios.p ... config) | tst.js:346:19:346:21 | url |
284285
| tst.js:347:5:347:30 | axios.p ... , data) | tst.js:347:21:347:23 | url |
285286
| tst.js:348:5:348:38 | axios.p ... config) | tst.js:348:21:348:23 | url |
287+
| tst.js:349:5:349:30 | axios.g ... url }) | tst.js:349:18:349:29 | { url: url } |
286288
test_getAResponseDataNode
287289
| axiosTest.js:4:5:7:6 | axios({ ... \\n }) | axiosTest.js:4:5:7:6 | axios({ ... \\n }) | json | true |
288290
| axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:12:5:17:6 | axios({ ... \\n }) | json | true |
@@ -374,3 +376,4 @@ test_getAResponseDataNode
374376
| tst.js:346:5:346:36 | axios.p ... config) | tst.js:346:5:346:36 | axios.p ... config) | json | true |
375377
| tst.js:347:5:347:30 | axios.p ... , data) | tst.js:347:5:347:30 | axios.p ... , data) | json | true |
376378
| tst.js:348:5:348:38 | axios.p ... config) | tst.js:348:5:348:38 | axios.p ... config) | json | true |
379+
| tst.js:349:5:349:30 | axios.g ... url }) | tst.js:349:5:349:30 | axios.g ... url }) | json | true |

javascript/ql/test/library-tests/frameworks/ClientRequests/tst.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,5 +346,5 @@ function moreAxiosTests(url, data, config){
346346
axios.putForm(url, data, config);
347347
axios.patchForm(url, data);
348348
axios.patchForm(url, data, config);
349-
axios.getUri({ url: url }); // not flagged
349+
axios.getUri({ url: url });
350350
}

0 commit comments

Comments
 (0)