mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 23:24:37 +00:00
fix(runtime): use more null proto objects (#23921)
This is a primordialization effort to improve resistance against users tampering with the global `Object` prototype. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
parent
6c167c64d6
commit
971f09abe4
32 changed files with 141 additions and 92 deletions
|
@ -300,7 +300,7 @@ class Request {
|
|||
* @param {RequestInfo} input
|
||||
* @param {RequestInit} init
|
||||
*/
|
||||
constructor(input, init = {}) {
|
||||
constructor(input, init = { __proto__: null }) {
|
||||
if (input === _brand) {
|
||||
this[_brand] = _brand;
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue