question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:open
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
erightscommented, Jan 21, 2022

not mn-1

0reactions
Tartuffocommented, Apr 8, 2022

@erights needs to check, this is probably just a small amount of work, if it is not already doing what it should.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found