mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
Remove Object.prototype.__proto__ (#4341)
This commit is contained in:
parent
64a35acd64
commit
2f4be6e944
5 changed files with 24 additions and 0 deletions
|
@ -400,6 +400,12 @@ function bootstrapWasmCompilerRuntime(): void {
|
|||
globalThis.onmessage = wasmCompilerOnMessage;
|
||||
}
|
||||
|
||||
// Removes the `__proto__` for security reasons. This intentionally makes
|
||||
// Deno non compliant with ECMA-262 Annex B.2.2.1
|
||||
//
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
delete (Object.prototype as any).__proto__;
|
||||
|
||||
Object.defineProperties(globalThis, {
|
||||
bootstrapWasmCompilerRuntime: {
|
||||
value: bootstrapWasmCompilerRuntime,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue