News for hackers. Stuff that matters.
Re:How JavaScript Works: deep dive into call, apply, and bind by Sephr on Friday July 09, 2021 @07:23PM (#27789610)
I've had to cache a secure reference to call() in a JS library intended to exist in potentially hostile environments.

This call helper is often used to avoid prototype pollution vulnerabilities when patching native prototypes.

Re:How JavaScript Works: deep dive into call, apply, and bind by bluepnume on Friday July 09, 2021 @07:25PM (#27789624)
Very interested to learn more about this use case. This is to protect against hostile environments blocking function calls by polluting prototypes?

I do a lot of work on SDKs which run in semi-hostile environments, so prototype pollution is something I'm frequently running up against.

Re:How JavaScript Works: deep dive into call, apply, and bind by Sephr on Friday July 09, 2021 @08:46PM (#27790102)
> This is to protect against hostile environments blocking function calls by polluting prototypes?

Correct. I go into more detail about into our problem space and use cases here: https://transcend.io/blog/defeating-cookie-banners