does removeProperties visit prototypes?
See original GitHub issue[edit 2020-09-15 @kriskowal]
@erights volunteers to verify that we have addressed this.
@dtribble and I were looking at removeProperties.js
, and we noticed that the clean()
function does a recursive traversal of named properties (Object.getOwnPropertyNames
) but is not traversing the Object.getPrototypeOf
links. It uses getPrototypeOf
to implement the *
permission value, but that only appears in getPermit()
and not in the traversal code.
As a result, we won’t be applying the whitelist to any of the prototypes, unless they’re reachable by other named pathways like Number.prototype
. Is this enough? Are there any primordials that are only reachable by following an Object.getPrototypeOf()
from some named object?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Why resetting prototype does not remove the property from ...
No, it shouldn't. The question was regarding why creating new prototype object haven't cleaned prototype in previously created object. And here ...
Read more >Explore component properties - Figma Help Center
Component properties are the changeable aspects of a component. You can define which parts of a component others can change by tying them...
Read more >RemovePropA function (winuser.h) - Win32 - Microsoft Learn
The application can remove only those properties it has added. It must not remove properties added by other applications or by the system ......
Read more >delete operator - JavaScript - MDN Web Docs - Mozilla
The delete operator removes a property from an object. If the property's value is an object and there are no more references to...
Read more >What Happens When You Freeze a Prototype in JavaScript
The Object.freeze() freezes an object. A frozen object can no longer be changed. We cannot add, edit, or remove properties from it. Now ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
not mn-1
@erights needs to check, this is probably just a small amount of work, if it is not already doing what it should.