mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
add test
This commit is contained in:
@@ -91,6 +91,20 @@ nodes
|
||||
| classnames.js:15:47:15:63 | clsx(window.name) |
|
||||
| classnames.js:15:52:15:62 | window.name |
|
||||
| classnames.js:15:52:15:62 | window.name |
|
||||
| clipboard.ts:8:11:8:51 | html |
|
||||
| clipboard.ts:8:18:8:51 | clipboa ... /html') |
|
||||
| clipboard.ts:8:18:8:51 | clipboa ... /html') |
|
||||
| clipboard.ts:15:25:15:28 | html |
|
||||
| clipboard.ts:15:25:15:28 | html |
|
||||
| clipboard.ts:24:23:24:58 | e.clipb ... /html') |
|
||||
| clipboard.ts:24:23:24:58 | e.clipb ... /html') |
|
||||
| clipboard.ts:24:23:24:58 | e.clipb ... /html') |
|
||||
| clipboard.ts:29:19:29:54 | e.clipb ... /html') |
|
||||
| clipboard.ts:29:19:29:54 | e.clipb ... /html') |
|
||||
| clipboard.ts:29:19:29:54 | e.clipb ... /html') |
|
||||
| clipboard.ts:33:19:33:68 | e.origi ... /html') |
|
||||
| clipboard.ts:33:19:33:68 | e.origi ... /html') |
|
||||
| clipboard.ts:33:19:33:68 | e.origi ... /html') |
|
||||
| d3.js:4:12:4:22 | window.name |
|
||||
| d3.js:4:12:4:22 | window.name |
|
||||
| d3.js:11:15:11:24 | getTaint() |
|
||||
@@ -857,6 +871,13 @@ edges
|
||||
| classnames.js:15:47:15:63 | clsx(window.name) | classnames.js:15:31:15:78 | `<span ... <span>` |
|
||||
| classnames.js:15:52:15:62 | window.name | classnames.js:15:47:15:63 | clsx(window.name) |
|
||||
| classnames.js:15:52:15:62 | window.name | classnames.js:15:47:15:63 | clsx(window.name) |
|
||||
| clipboard.ts:8:11:8:51 | html | clipboard.ts:15:25:15:28 | html |
|
||||
| clipboard.ts:8:11:8:51 | html | clipboard.ts:15:25:15:28 | html |
|
||||
| clipboard.ts:8:18:8:51 | clipboa ... /html') | clipboard.ts:8:11:8:51 | html |
|
||||
| clipboard.ts:8:18:8:51 | clipboa ... /html') | clipboard.ts:8:11:8:51 | html |
|
||||
| clipboard.ts:24:23:24:58 | e.clipb ... /html') | clipboard.ts:24:23:24:58 | e.clipb ... /html') |
|
||||
| clipboard.ts:29:19:29:54 | e.clipb ... /html') | clipboard.ts:29:19:29:54 | e.clipb ... /html') |
|
||||
| clipboard.ts:33:19:33:68 | e.origi ... /html') | clipboard.ts:33:19:33:68 | e.origi ... /html') |
|
||||
| d3.js:4:12:4:22 | window.name | d3.js:11:15:11:24 | getTaint() |
|
||||
| d3.js:4:12:4:22 | window.name | d3.js:11:15:11:24 | getTaint() |
|
||||
| d3.js:4:12:4:22 | window.name | d3.js:11:15:11:24 | getTaint() |
|
||||
@@ -1514,6 +1535,10 @@ edges
|
||||
| classnames.js:11:31:11:79 | `<span ... <span>` | classnames.js:10:45:10:55 | window.name | classnames.js:11:31:11:79 | `<span ... <span>` | Cross-site scripting vulnerability due to $@. | classnames.js:10:45:10:55 | window.name | user-provided value |
|
||||
| classnames.js:13:31:13:83 | `<span ... <span>` | classnames.js:13:57:13:67 | window.name | classnames.js:13:31:13:83 | `<span ... <span>` | Cross-site scripting vulnerability due to $@. | classnames.js:13:57:13:67 | window.name | user-provided value |
|
||||
| classnames.js:15:31:15:78 | `<span ... <span>` | classnames.js:15:52:15:62 | window.name | classnames.js:15:31:15:78 | `<span ... <span>` | Cross-site scripting vulnerability due to $@. | classnames.js:15:52:15:62 | window.name | user-provided value |
|
||||
| clipboard.ts:15:25:15:28 | html | clipboard.ts:8:18:8:51 | clipboa ... /html') | clipboard.ts:15:25:15:28 | html | Cross-site scripting vulnerability due to $@. | clipboard.ts:8:18:8:51 | clipboa ... /html') | user-provided value |
|
||||
| clipboard.ts:24:23:24:58 | e.clipb ... /html') | clipboard.ts:24:23:24:58 | e.clipb ... /html') | clipboard.ts:24:23:24:58 | e.clipb ... /html') | Cross-site scripting vulnerability due to $@. | clipboard.ts:24:23:24:58 | e.clipb ... /html') | user-provided value |
|
||||
| clipboard.ts:29:19:29:54 | e.clipb ... /html') | clipboard.ts:29:19:29:54 | e.clipb ... /html') | clipboard.ts:29:19:29:54 | e.clipb ... /html') | Cross-site scripting vulnerability due to $@. | clipboard.ts:29:19:29:54 | e.clipb ... /html') | user-provided value |
|
||||
| clipboard.ts:33:19:33:68 | e.origi ... /html') | clipboard.ts:33:19:33:68 | e.origi ... /html') | clipboard.ts:33:19:33:68 | e.origi ... /html') | Cross-site scripting vulnerability due to $@. | clipboard.ts:33:19:33:68 | e.origi ... /html') | user-provided value |
|
||||
| d3.js:11:15:11:24 | getTaint() | d3.js:4:12:4:22 | window.name | d3.js:11:15:11:24 | getTaint() | Cross-site scripting vulnerability due to $@. | d3.js:4:12:4:22 | window.name | user-provided value |
|
||||
| d3.js:12:20:12:29 | getTaint() | d3.js:4:12:4:22 | window.name | d3.js:12:20:12:29 | getTaint() | Cross-site scripting vulnerability due to $@. | d3.js:4:12:4:22 | window.name | user-provided value |
|
||||
| d3.js:14:20:14:29 | getTaint() | d3.js:4:12:4:22 | window.name | d3.js:14:20:14:29 | getTaint() | Cross-site scripting vulnerability due to $@. | d3.js:4:12:4:22 | window.name | user-provided value |
|
||||
|
||||
@@ -91,6 +91,20 @@ nodes
|
||||
| classnames.js:15:47:15:63 | clsx(window.name) |
|
||||
| classnames.js:15:52:15:62 | window.name |
|
||||
| classnames.js:15:52:15:62 | window.name |
|
||||
| clipboard.ts:8:11:8:51 | html |
|
||||
| clipboard.ts:8:18:8:51 | clipboa ... /html') |
|
||||
| clipboard.ts:8:18:8:51 | clipboa ... /html') |
|
||||
| clipboard.ts:15:25:15:28 | html |
|
||||
| clipboard.ts:15:25:15:28 | html |
|
||||
| clipboard.ts:24:23:24:58 | e.clipb ... /html') |
|
||||
| clipboard.ts:24:23:24:58 | e.clipb ... /html') |
|
||||
| clipboard.ts:24:23:24:58 | e.clipb ... /html') |
|
||||
| clipboard.ts:29:19:29:54 | e.clipb ... /html') |
|
||||
| clipboard.ts:29:19:29:54 | e.clipb ... /html') |
|
||||
| clipboard.ts:29:19:29:54 | e.clipb ... /html') |
|
||||
| clipboard.ts:33:19:33:68 | e.origi ... /html') |
|
||||
| clipboard.ts:33:19:33:68 | e.origi ... /html') |
|
||||
| clipboard.ts:33:19:33:68 | e.origi ... /html') |
|
||||
| d3.js:4:12:4:22 | window.name |
|
||||
| d3.js:4:12:4:22 | window.name |
|
||||
| d3.js:11:15:11:24 | getTaint() |
|
||||
@@ -875,6 +889,13 @@ edges
|
||||
| classnames.js:15:47:15:63 | clsx(window.name) | classnames.js:15:31:15:78 | `<span ... <span>` |
|
||||
| classnames.js:15:52:15:62 | window.name | classnames.js:15:47:15:63 | clsx(window.name) |
|
||||
| classnames.js:15:52:15:62 | window.name | classnames.js:15:47:15:63 | clsx(window.name) |
|
||||
| clipboard.ts:8:11:8:51 | html | clipboard.ts:15:25:15:28 | html |
|
||||
| clipboard.ts:8:11:8:51 | html | clipboard.ts:15:25:15:28 | html |
|
||||
| clipboard.ts:8:18:8:51 | clipboa ... /html') | clipboard.ts:8:11:8:51 | html |
|
||||
| clipboard.ts:8:18:8:51 | clipboa ... /html') | clipboard.ts:8:11:8:51 | html |
|
||||
| clipboard.ts:24:23:24:58 | e.clipb ... /html') | clipboard.ts:24:23:24:58 | e.clipb ... /html') |
|
||||
| clipboard.ts:29:19:29:54 | e.clipb ... /html') | clipboard.ts:29:19:29:54 | e.clipb ... /html') |
|
||||
| clipboard.ts:33:19:33:68 | e.origi ... /html') | clipboard.ts:33:19:33:68 | e.origi ... /html') |
|
||||
| d3.js:4:12:4:22 | window.name | d3.js:11:15:11:24 | getTaint() |
|
||||
| d3.js:4:12:4:22 | window.name | d3.js:11:15:11:24 | getTaint() |
|
||||
| d3.js:4:12:4:22 | window.name | d3.js:11:15:11:24 | getTaint() |
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
$("#foo").on("paste", paste);
|
||||
|
||||
function paste(e) {
|
||||
const { clipboardData } = e.originalEvent;
|
||||
if (!clipboardData) return;
|
||||
|
||||
const text = clipboardData.getData('text/plain');
|
||||
const html = clipboardData.getData('text/html');
|
||||
if (!text && !html) return;
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
const div = document.createElement('div');
|
||||
if (html) {
|
||||
div.innerHTML = html; // NOT OK
|
||||
} else {
|
||||
div.textContent = text;
|
||||
}
|
||||
document.body.append(div);
|
||||
}
|
||||
|
||||
export function install(el: HTMLElement): void {
|
||||
el.addEventListener('paste', (e) => {
|
||||
$("#id").html(e.clipboardData.getData('text/html')); // NOT OK
|
||||
})
|
||||
}
|
||||
|
||||
document.addEventListener('paste', (e) => {
|
||||
$("#id").html(e.clipboardData.getData('text/html')); // NOT OK
|
||||
});
|
||||
|
||||
$("#foo").bind('paste', (e) => {
|
||||
$("#id").html(e.originalEvent.clipboardData.getData('text/html')); // NOT OK
|
||||
});
|
||||
Reference in New Issue
Block a user