mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
@@ -3,3 +3,4 @@
|
||||
| IncompleteUrlSchemeCheck.js:23:9:23:43 | badProt ... scheme) | This check does not consider vbscript:. |
|
||||
| IncompleteUrlSchemeCheck.js:30:9:30:43 | badProt ... scheme) | This check does not consider vbscript:. |
|
||||
| IncompleteUrlSchemeCheck.js:37:9:37:31 | scheme ... script" | This check does not consider data: and vbscript:. |
|
||||
| IncompleteUrlSchemeCheck.js:51:9:51:31 | scheme ... script" | This check does not consider data: and vbscript:. |
|
||||
|
||||
@@ -45,3 +45,10 @@ function test6(url) {
|
||||
return "about:blank";
|
||||
return url;
|
||||
}
|
||||
|
||||
function test7(url) {
|
||||
let scheme = url.split(/:/)[0];
|
||||
if (scheme === "javascript") // NOT OK
|
||||
return "about:blank";
|
||||
return url;
|
||||
}
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -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:9:28:9:30 | loc |
|
||||
| typeahead.js:9:28:9:30 | loc |
|
||||
| typeahead.js:10:16:10:18 | loc |
|
||||
@@ -693,6 +699,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:9:28:9:30 | loc | typeahead.js:10:16:10:18 | loc |
|
||||
| typeahead.js:9:28:9:30 | loc | typeahead.js:10:16:10:18 | loc |
|
||||
| typeahead.js:9:28:9:30 | loc | typeahead.js:10:16:10:18 | loc |
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
@@ -80,6 +80,37 @@ nodes
|
||||
| PrototypePollutionUtility/path-assignment.js:61:12:61:18 | keys[i] |
|
||||
| PrototypePollutionUtility/path-assignment.js:61:12:61:18 | keys[i] |
|
||||
| PrototypePollutionUtility/path-assignment.js:61:12:61:18 | keys[i] |
|
||||
| PrototypePollutionUtility/path-assignment.js:68:13:68:25 | key |
|
||||
| PrototypePollutionUtility/path-assignment.js:68:13:68:25 | key |
|
||||
| PrototypePollutionUtility/path-assignment.js:68:19:68:25 | keys[i] |
|
||||
| PrototypePollutionUtility/path-assignment.js:68:19:68:25 | keys[i] |
|
||||
| PrototypePollutionUtility/path-assignment.js:68:19:68:25 | keys[i] |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:9:69:48 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:9:69:48 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:18:69:23 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:18:69:23 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:18:69:23 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:18:69:48 | target[ ... ] \|\| {} |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:18:69:48 | target[ ... ] \|\| {} |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:25:69:27 | key |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:25:69:27 | key |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:25:69:27 | key |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:32:69:37 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:32:69:37 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:32:69:42 | target[key] |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:32:69:42 | target[key] |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:32:69:48 | target[key] \|\| {} |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:32:69:48 | target[key] \|\| {} |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:32:69:48 | target[key] \|\| {} |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:39:69:41 | key |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:39:69:41 | key |
|
||||
| PrototypePollutionUtility/path-assignment.js:71:5:71:10 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:71:5:71:10 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:71:5:71:10 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:71:12:71:18 | keys[i] |
|
||||
| PrototypePollutionUtility/path-assignment.js:71:12:71:18 | keys[i] |
|
||||
| PrototypePollutionUtility/path-assignment.js:71:12:71:18 | keys[i] |
|
||||
| PrototypePollutionUtility/path-assignment.js:71:12:71:18 | keys[i] |
|
||||
| PrototypePollutionUtility/tests.js:3:25:3:27 | dst |
|
||||
| PrototypePollutionUtility/tests.js:3:25:3:27 | dst |
|
||||
| PrototypePollutionUtility/tests.js:3:30:3:32 | src |
|
||||
@@ -1378,6 +1409,39 @@ edges
|
||||
| PrototypePollutionUtility/path-assignment.js:59:39:59:41 | key | PrototypePollutionUtility/path-assignment.js:59:32:59:42 | target[key] |
|
||||
| PrototypePollutionUtility/path-assignment.js:59:39:59:41 | key | PrototypePollutionUtility/path-assignment.js:59:32:59:42 | target[key] |
|
||||
| PrototypePollutionUtility/path-assignment.js:61:12:61:18 | keys[i] | PrototypePollutionUtility/path-assignment.js:61:12:61:18 | keys[i] |
|
||||
| PrototypePollutionUtility/path-assignment.js:68:13:68:25 | key | PrototypePollutionUtility/path-assignment.js:69:25:69:27 | key |
|
||||
| PrototypePollutionUtility/path-assignment.js:68:13:68:25 | key | PrototypePollutionUtility/path-assignment.js:69:25:69:27 | key |
|
||||
| PrototypePollutionUtility/path-assignment.js:68:13:68:25 | key | PrototypePollutionUtility/path-assignment.js:69:25:69:27 | key |
|
||||
| PrototypePollutionUtility/path-assignment.js:68:13:68:25 | key | PrototypePollutionUtility/path-assignment.js:69:25:69:27 | key |
|
||||
| PrototypePollutionUtility/path-assignment.js:68:13:68:25 | key | PrototypePollutionUtility/path-assignment.js:69:39:69:41 | key |
|
||||
| PrototypePollutionUtility/path-assignment.js:68:13:68:25 | key | PrototypePollutionUtility/path-assignment.js:69:39:69:41 | key |
|
||||
| PrototypePollutionUtility/path-assignment.js:68:19:68:25 | keys[i] | PrototypePollutionUtility/path-assignment.js:68:13:68:25 | key |
|
||||
| PrototypePollutionUtility/path-assignment.js:68:19:68:25 | keys[i] | PrototypePollutionUtility/path-assignment.js:68:13:68:25 | key |
|
||||
| PrototypePollutionUtility/path-assignment.js:68:19:68:25 | keys[i] | PrototypePollutionUtility/path-assignment.js:68:13:68:25 | key |
|
||||
| PrototypePollutionUtility/path-assignment.js:68:19:68:25 | keys[i] | PrototypePollutionUtility/path-assignment.js:68:13:68:25 | key |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:9:69:48 | target | PrototypePollutionUtility/path-assignment.js:69:18:69:23 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:9:69:48 | target | PrototypePollutionUtility/path-assignment.js:69:18:69:23 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:9:69:48 | target | PrototypePollutionUtility/path-assignment.js:69:18:69:23 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:9:69:48 | target | PrototypePollutionUtility/path-assignment.js:69:18:69:23 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:9:69:48 | target | PrototypePollutionUtility/path-assignment.js:69:32:69:37 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:9:69:48 | target | PrototypePollutionUtility/path-assignment.js:69:32:69:37 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:9:69:48 | target | PrototypePollutionUtility/path-assignment.js:71:5:71:10 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:9:69:48 | target | PrototypePollutionUtility/path-assignment.js:71:5:71:10 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:9:69:48 | target | PrototypePollutionUtility/path-assignment.js:71:5:71:10 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:9:69:48 | target | PrototypePollutionUtility/path-assignment.js:71:5:71:10 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:18:69:48 | target[ ... ] \|\| {} | PrototypePollutionUtility/path-assignment.js:69:9:69:48 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:18:69:48 | target[ ... ] \|\| {} | PrototypePollutionUtility/path-assignment.js:69:9:69:48 | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:32:69:37 | target | PrototypePollutionUtility/path-assignment.js:69:32:69:42 | target[key] |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:32:69:37 | target | PrototypePollutionUtility/path-assignment.js:69:32:69:42 | target[key] |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:32:69:42 | target[key] | PrototypePollutionUtility/path-assignment.js:69:32:69:48 | target[key] \|\| {} |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:32:69:42 | target[key] | PrototypePollutionUtility/path-assignment.js:69:32:69:48 | target[key] \|\| {} |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:32:69:42 | target[key] | PrototypePollutionUtility/path-assignment.js:69:32:69:48 | target[key] \|\| {} |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:32:69:42 | target[key] | PrototypePollutionUtility/path-assignment.js:69:32:69:48 | target[key] \|\| {} |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:32:69:48 | target[key] \|\| {} | PrototypePollutionUtility/path-assignment.js:69:18:69:48 | target[ ... ] \|\| {} |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:32:69:48 | target[key] \|\| {} | PrototypePollutionUtility/path-assignment.js:69:18:69:48 | target[ ... ] \|\| {} |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:39:69:41 | key | PrototypePollutionUtility/path-assignment.js:69:32:69:42 | target[key] |
|
||||
| PrototypePollutionUtility/path-assignment.js:69:39:69:41 | key | PrototypePollutionUtility/path-assignment.js:69:32:69:42 | target[key] |
|
||||
| PrototypePollutionUtility/path-assignment.js:71:12:71:18 | keys[i] | PrototypePollutionUtility/path-assignment.js:71:12:71:18 | keys[i] |
|
||||
| PrototypePollutionUtility/tests.js:3:25:3:27 | dst | PrototypePollutionUtility/tests.js:6:28:6:30 | dst |
|
||||
| PrototypePollutionUtility/tests.js:3:25:3:27 | dst | PrototypePollutionUtility/tests.js:6:28:6:30 | dst |
|
||||
| PrototypePollutionUtility/tests.js:3:25:3:27 | dst | PrototypePollutionUtility/tests.js:8:13:8:15 | dst |
|
||||
@@ -2922,6 +2986,7 @@ edges
|
||||
| PrototypePollutionUtility/path-assignment.js:15:13:15:18 | target | PrototypePollutionUtility/path-assignment.js:8:19:8:25 | keys[i] | PrototypePollutionUtility/path-assignment.js:15:13:15:18 | target | The property chain $@ is recursively assigned to $@ without guarding against prototype pollution. | PrototypePollutionUtility/path-assignment.js:8:19:8:25 | keys[i] | here | PrototypePollutionUtility/path-assignment.js:15:13:15:18 | target | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:44:5:44:10 | target | PrototypePollutionUtility/path-assignment.js:41:19:41:25 | keys[i] | PrototypePollutionUtility/path-assignment.js:44:5:44:10 | target | The property chain $@ is recursively assigned to $@ without guarding against prototype pollution. | PrototypePollutionUtility/path-assignment.js:41:19:41:25 | keys[i] | here | PrototypePollutionUtility/path-assignment.js:44:5:44:10 | target | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:61:5:61:10 | target | PrototypePollutionUtility/path-assignment.js:58:19:58:25 | keys[i] | PrototypePollutionUtility/path-assignment.js:61:5:61:10 | target | The property chain $@ is recursively assigned to $@ without guarding against prototype pollution. | PrototypePollutionUtility/path-assignment.js:58:19:58:25 | keys[i] | here | PrototypePollutionUtility/path-assignment.js:61:5:61:10 | target | target |
|
||||
| PrototypePollutionUtility/path-assignment.js:71:5:71:10 | target | PrototypePollutionUtility/path-assignment.js:68:19:68:25 | keys[i] | PrototypePollutionUtility/path-assignment.js:71:5:71:10 | target | The property chain $@ is recursively assigned to $@ without guarding against prototype pollution. | PrototypePollutionUtility/path-assignment.js:68:19:68:25 | keys[i] | here | PrototypePollutionUtility/path-assignment.js:71:5:71:10 | target | target |
|
||||
| PrototypePollutionUtility/tests.js:8:13:8:15 | dst | PrototypePollutionUtility/tests.js:4:14:4:16 | key | PrototypePollutionUtility/tests.js:8:13:8:15 | dst | Properties are copied from $@ to $@ without guarding against prototype pollution. | PrototypePollutionUtility/tests.js:4:21:4:23 | src | src | PrototypePollutionUtility/tests.js:8:13:8:15 | dst | dst |
|
||||
| PrototypePollutionUtility/tests.js:18:13:18:15 | dst | PrototypePollutionUtility/tests.js:14:30:14:32 | key | PrototypePollutionUtility/tests.js:18:13:18:15 | dst | Properties are copied from $@ to $@ without guarding against prototype pollution. | PrototypePollutionUtility/tests.js:14:17:14:19 | src | src | PrototypePollutionUtility/tests.js:18:13:18:15 | dst | dst |
|
||||
| PrototypePollutionUtility/tests.js:36:9:36:11 | dst | PrototypePollutionUtility/tests.js:25:18:25:20 | key | PrototypePollutionUtility/tests.js:36:9:36:11 | dst | Properties are copied from $@ to $@ without guarding against prototype pollution. | PrototypePollutionUtility/tests.js:25:25:25:30 | source | source | PrototypePollutionUtility/tests.js:36:9:36:11 | dst | dst |
|
||||
|
||||
@@ -60,3 +60,13 @@ function assignToPathWithHelper(target, path, value, sep) {
|
||||
}
|
||||
target[keys[i]] = value; // NOT OK
|
||||
}
|
||||
|
||||
function spltOnRegexp(target, path, value) {
|
||||
let keys = path.split(/\./);
|
||||
let i;
|
||||
for (i = 0; i < keys.length - 1; ++i) {
|
||||
let key = keys[i];
|
||||
target = target[key] = target[key] || {};
|
||||
}
|
||||
target[keys[i]] = value; // NOT OK
|
||||
}
|
||||
@@ -55,6 +55,18 @@ nodes
|
||||
| tst10.js:14:33:14:49 | document.location |
|
||||
| tst10.js:14:33:14:49 | document.location |
|
||||
| tst10.js:14:33:14:56 | documen ... .search |
|
||||
| tst12.js:3:9:3:50 | urlParts |
|
||||
| tst12.js:3:20:3:34 | window.location |
|
||||
| tst12.js:3:20:3:34 | window.location |
|
||||
| tst12.js:3:20:3:34 | window.location |
|
||||
| tst12.js:3:20:3:39 | window.location.hash |
|
||||
| tst12.js:3:20:3:50 | window. ... it('?') |
|
||||
| tst12.js:4:9:4:45 | loc |
|
||||
| tst12.js:4:15:4:22 | urlParts |
|
||||
| tst12.js:4:15:4:25 | urlParts[0] |
|
||||
| tst12.js:4:15:4:45 | urlPart ... s.value |
|
||||
| tst12.js:5:23:5:25 | loc |
|
||||
| tst12.js:5:23:5:25 | loc |
|
||||
| tst.js:2:19:2:69 | /.*redi ... n.href) |
|
||||
| tst.js:2:19:2:72 | /.*redi ... ref)[1] |
|
||||
| tst.js:2:19:2:72 | /.*redi ... ref)[1] |
|
||||
@@ -120,6 +132,18 @@ edges
|
||||
| tst10.js:14:33:14:49 | document.location | tst10.js:14:33:14:56 | documen ... .search |
|
||||
| tst10.js:14:33:14:56 | documen ... .search | tst10.js:14:17:14:56 | 'https: ... .search |
|
||||
| tst10.js:14:33:14:56 | documen ... .search | tst10.js:14:17:14:56 | 'https: ... .search |
|
||||
| tst12.js:3:9:3:50 | urlParts | tst12.js:4:15:4:22 | urlParts |
|
||||
| tst12.js:3:20:3:34 | window.location | tst12.js:3:20:3:39 | window.location.hash |
|
||||
| tst12.js:3:20:3:34 | window.location | tst12.js:3:20:3:39 | window.location.hash |
|
||||
| tst12.js:3:20:3:34 | window.location | tst12.js:3:20:3:39 | window.location.hash |
|
||||
| tst12.js:3:20:3:39 | window.location.hash | tst12.js:3:20:3:50 | window. ... it('?') |
|
||||
| tst12.js:3:20:3:50 | window. ... it('?') | tst12.js:3:9:3:50 | urlParts |
|
||||
| tst12.js:4:9:4:45 | loc | tst12.js:5:23:5:25 | loc |
|
||||
| tst12.js:4:9:4:45 | loc | tst12.js:5:23:5:25 | loc |
|
||||
| tst12.js:4:15:4:22 | urlParts | tst12.js:4:15:4:25 | urlParts[0] |
|
||||
| tst12.js:4:15:4:25 | urlParts[0] | tst12.js:4:15:4:45 | urlPart ... s.value |
|
||||
| tst12.js:4:15:4:45 | urlPart ... s.value | tst12.js:4:9:4:45 | loc |
|
||||
| tst12.js:5:23:5:25 | loc | tst12.js:3:20:3:34 | window.location |
|
||||
| tst.js:2:19:2:69 | /.*redi ... n.href) | tst.js:2:19:2:72 | /.*redi ... ref)[1] |
|
||||
| tst.js:2:19:2:69 | /.*redi ... n.href) | tst.js:2:19:2:72 | /.*redi ... ref)[1] |
|
||||
| tst.js:2:47:2:63 | document.location | tst.js:2:47:2:68 | documen ... on.href |
|
||||
@@ -142,5 +166,6 @@ edges
|
||||
| tst10.js:8:17:8:47 | '//' + ... .search | tst10.js:8:24:8:40 | document.location | tst10.js:8:17:8:47 | '//' + ... .search | Untrusted URL redirection due to $@. | tst10.js:8:24:8:40 | document.location | user-provided value |
|
||||
| tst10.js:11:17:11:50 | '//foo' ... .search | tst10.js:11:27:11:43 | document.location | tst10.js:11:17:11:50 | '//foo' ... .search | Untrusted URL redirection due to $@. | tst10.js:11:27:11:43 | document.location | user-provided value |
|
||||
| tst10.js:14:17:14:56 | 'https: ... .search | tst10.js:14:33:14:49 | document.location | tst10.js:14:17:14:56 | 'https: ... .search | Untrusted URL redirection due to $@. | tst10.js:14:33:14:49 | document.location | user-provided value |
|
||||
| tst12.js:5:23:5:25 | loc | tst12.js:3:20:3:34 | window.location | tst12.js:5:23:5:25 | loc | Untrusted URL redirection due to $@. | tst12.js:3:20:3:34 | window.location | user-provided value |
|
||||
| tst.js:2:19:2:72 | /.*redi ... ref)[1] | tst.js:2:47:2:63 | document.location | tst.js:2:19:2:72 | /.*redi ... ref)[1] | Untrusted URL redirection due to $@. | tst.js:2:47:2:63 | document.location | user-provided value |
|
||||
| tst.js:6:20:6:59 | indirec ... ref)[1] | tst.js:6:34:6:50 | document.location | tst.js:6:20:6:59 | indirec ... ref)[1] | Untrusted URL redirection due to $@. | tst.js:6:34:6:50 | document.location | user-provided value |
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// OK
|
||||
function foo() {
|
||||
var urlParts = document.location.href.split('?');
|
||||
var loc = urlParts[0] + "?" + boxes.value;
|
||||
window.location = loc
|
||||
|
||||
// Also OK.
|
||||
window.location.replace(window.location.href.split("#")[0] + "#mappage");
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// NOT OK
|
||||
function foo() {
|
||||
var urlParts = window.location.hash.split('?');
|
||||
var loc = urlParts[0] + "?" + boxes.value;
|
||||
window.location = loc
|
||||
}
|
||||
Reference in New Issue
Block a user