summaryrefslogtreecommitdiff
path: root/cli/tests/proto_exploit.js
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2020-03-15 21:34:22 +1100
committerGitHub <noreply@github.com>2020-03-15 11:34:22 +0100
commit2f4be6e9441c7d5b0afd0d37dccd48d3057bcd3f (patch)
tree550a6eae50fc99029c97518af338d0ed3e50206d /cli/tests/proto_exploit.js
parent64a35acd64f4a9aedfb52f6b364c229c6f7e4090 (diff)
Remove Object.prototype.__proto__ (#4341)
Diffstat (limited to 'cli/tests/proto_exploit.js')
-rw-r--r--cli/tests/proto_exploit.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/tests/proto_exploit.js b/cli/tests/proto_exploit.js
new file mode 100644
index 000000000..8bd22cfe5
--- /dev/null
+++ b/cli/tests/proto_exploit.js
@@ -0,0 +1,5 @@
+const payload = `{ "__proto__": null }`;
+const obj = {};
+console.log("Before: " + obj);
+Object.assign(obj, JSON.parse(payload));
+console.log("After: " + obj);