mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
add test case for location.split("?")[0] for DomBasedXss
This commit is contained in:
@@ -357,6 +357,12 @@ nodes
|
||||
| tst.js:366:21:366:26 | target |
|
||||
| tst.js:369:18:369:23 | target |
|
||||
| tst.js:369:18:369:23 | target |
|
||||
| tst.js:377:7:377:39 | target |
|
||||
| tst.js:377:16:377:32 | document.location |
|
||||
| tst.js:377:16:377:32 | document.location |
|
||||
| tst.js:377:16:377:39 | documen ... .search |
|
||||
| tst.js:380:18:380:23 | target |
|
||||
| tst.js:380:18:380:23 | target |
|
||||
| typeahead.js:20:13:20:45 | target |
|
||||
| typeahead.js:20:22:20:38 | document.location |
|
||||
| typeahead.js:20:22:20:38 | document.location |
|
||||
@@ -689,6 +695,11 @@ edges
|
||||
| tst.js:361:19:361:35 | document.location | tst.js:361:19:361:42 | documen ... .search |
|
||||
| tst.js:361:19:361:35 | document.location | tst.js:361:19:361:42 | documen ... .search |
|
||||
| tst.js:361:19:361:42 | documen ... .search | tst.js:361:10:361:42 | target |
|
||||
| tst.js:377:7:377:39 | target | tst.js:380:18:380:23 | target |
|
||||
| tst.js:377:7:377:39 | target | tst.js:380:18:380:23 | target |
|
||||
| tst.js:377:16:377:32 | document.location | tst.js:377:16:377:39 | documen ... .search |
|
||||
| tst.js:377:16:377:32 | document.location | tst.js:377:16:377:39 | documen ... .search |
|
||||
| tst.js:377:16:377:39 | documen ... .search | tst.js:377:7:377:39 | target |
|
||||
| typeahead.js:20:13:20:45 | target | typeahead.js:21:12:21:17 | target |
|
||||
| typeahead.js:20:22:20:38 | document.location | typeahead.js:20:22:20:45 | documen ... .search |
|
||||
| typeahead.js:20:22:20:38 | document.location | typeahead.js:20:22:20:45 | documen ... .search |
|
||||
@@ -794,6 +805,7 @@ edges
|
||||
| tst.js:362:16:362:21 | target | tst.js:361:19:361:35 | document.location | tst.js:362:16:362:21 | target | Cross-site scripting vulnerability due to $@. | tst.js:361:19:361:35 | document.location | user-provided value |
|
||||
| tst.js:366:21:366:26 | target | tst.js:361:19:361:35 | document.location | tst.js:366:21:366:26 | target | Cross-site scripting vulnerability due to $@. | tst.js:361:19:361:35 | document.location | user-provided value |
|
||||
| tst.js:369:18:369:23 | target | tst.js:361:19:361:35 | document.location | tst.js:369:18:369:23 | target | Cross-site scripting vulnerability due to $@. | tst.js:361:19:361:35 | document.location | user-provided value |
|
||||
| tst.js:380:18:380:23 | target | tst.js:377:16:377:32 | document.location | tst.js:380:18:380:23 | target | Cross-site scripting vulnerability due to $@. | tst.js:377:16:377:32 | document.location | user-provided value |
|
||||
| typeahead.js:25:18:25:20 | val | typeahead.js:20:22:20:38 | document.location | typeahead.js:25:18:25:20 | val | Cross-site scripting vulnerability due to $@. | typeahead.js:20:22:20:38 | document.location | user-provided value |
|
||||
| v-html.vue:2:8:2:23 | v-html=tainted | v-html.vue:6:42:6:58 | document.location | v-html.vue:2:8:2:23 | v-html=tainted | Cross-site scripting vulnerability due to $@. | v-html.vue:6:42:6:58 | document.location | user-provided value |
|
||||
| winjs.js:3:43:3:49 | tainted | winjs.js:2:17:2:33 | document.location | winjs.js:3:43:3:49 | tainted | Cross-site scripting vulnerability due to $@. | winjs.js:2:17:2:33 | document.location | user-provided value |
|
||||
|
||||
@@ -372,3 +372,13 @@ function thisNodes() {
|
||||
$.fn[pluginName] = myPlugin;
|
||||
|
||||
}
|
||||
|
||||
function test() {
|
||||
var target = document.location.search
|
||||
|
||||
// NOT OK
|
||||
$('myId').html(target)
|
||||
|
||||
// OK
|
||||
$('myid').html(document.location.href.split("?")[0]);
|
||||
}
|
||||
Reference in New Issue
Block a user