diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-03-15 21:34:22 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-15 11:34:22 +0100 |
commit | 2f4be6e9441c7d5b0afd0d37dccd48d3057bcd3f (patch) | |
tree | 550a6eae50fc99029c97518af338d0ed3e50206d /cli/tests/proto_exploit.js | |
parent | 64a35acd64f4a9aedfb52f6b364c229c6f7e4090 (diff) |
Remove Object.prototype.__proto__ (#4341)
Diffstat (limited to 'cli/tests/proto_exploit.js')
-rw-r--r-- | cli/tests/proto_exploit.js | 5 |
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); |