Private symbols auto-unwrapping proxies (was: Security Demands Simplicity (was: Private Slots))
Tom Van Cutsem
tomvc.be at gmail.com
Mon Jan 28 23:42:25 PST 2013
2013/1/28 David Bruant <bruant.d at gmail.com>
> I don't understand why problem B isn't solved with the first proposal.
> Since the proxy is pierced, access to private symbol'ed properties don't
> trap and the proxy can't throw on access (since it's not trapped).
> If I'm misunderstanding the proposal, could you show an example, under the
> unconditional forwarding proposal in which the problem B can be reproduced.
As noted on the wiki page:
"It’s worth noting that revocable proxies (those created using
Proxy.revocable) can still stop forwarding private symbol access when
revoked. Hence, under this proposal, we solve problem A, but private symbol
access remains “unreliable” (we don’t solve problem B)."
i.e. the problem only exists for revocable proxies. When revoked, these set
their [[Target]] to null. This implies that transparently forwarding
private symbol lookups to the target will fail when revoked.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss