-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sandbox inheritied properties flattened after vm.runInNewContext #5350
Comments
@waynedpj do you see the same behaviour with the last stable version of nodejs ? |
@abenhamdine yes, i still see the same issue w/ 5.7. i have been investigating this further, and though i am not totally following what is going on yet, i suspect that this flattening of sandbox's prototype chain might be happening here in does your issue involve the sandbox being modified unexpectedly? please let us know if you find anything and thanks. |
PS. @abenhamdine which strange behaviors are you seeing? |
I just opened an issue : #5491 |
Pretty certain this is the same issue as #2734 |
@nodejs/v8 ... can anyone on the v8 site assist with this one? |
I'll sync with Domenic and Ali to understand the exact requirements here. |
PR-URL: #10319 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
PR-URL: #10319 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
PR-URL: #10319 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
PR-URL: #10319 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
PR-URL: #10319 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
PR-URL: #10319 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Should this be closed as a duplicate of #2734? |
@Trott Sure. |
Actually, this is a different issue, as it describes the |
Fixes: nodejs#2734 Fixes: nodejs#5350 Fixes: nodejs#5679
This got fixed in #16293. |
thanks! |
The known issue is fixed with nodejs#16293. The text needs to call `Object.hasOwnProperty(this)` instead of `this.hasOwnProperty()`, otherwise `this` is from the wrong context is used. Add a second test case taken verbatim from issue nodejs#5350 Fixes: nodejs#5350 Refs: nodejs#16293
The known issue is fixed with nodejs#16293. The text needs to call `Object.hasOwnProperty(this)` instead of `this.hasOwnProperty()`, otherwise `this` is from the wrong context is used. Add a second test case taken verbatim from issue nodejs#5350 PR-URL: nodejs#16411 Fixes: nodejs#5350 Ref: nodejs#16293 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
The known issue is fixed with nodejs/node#16293. The text needs to call `Object.hasOwnProperty(this)` instead of `this.hasOwnProperty()`, otherwise `this` is from the wrong context is used. Add a second test case taken verbatim from issue nodejs/node#5350 PR-URL: nodejs/node#16411 Fixes: nodejs/node#5350 Ref: nodejs/node#16293 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
The known issue is fixed with #16293. The text needs to call `Object.hasOwnProperty(this)` instead of `this.hasOwnProperty()`, otherwise `this` is from the wrong context is used. Add a second test case taken verbatim from issue #5350 PR-URL: #16411 Fixes: #5350 Ref: #16293 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
The known issue is fixed with nodejs/node#16293. The text needs to call `Object.hasOwnProperty(this)` instead of `this.hasOwnProperty()`, otherwise `this` is from the wrong context is used. Add a second test case taken verbatim from issue nodejs/node#5350 PR-URL: nodejs/node#16411 Fixes: nodejs/node#5350 Ref: nodejs/node#16293 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
on node-4.5.1 when using a sandbox Object with inherited properties, after running sandbox in
vm.runInNewContext
all properties up the prototype chain are copied to sandbox Object, even if they are not changed by code, though the prototype chain is still there. here is a failing test casenote that the same problem occurs even if
code
is empty, as well as withvm.runInContext
.not sure if this is expected behavior or not, but i was surprised to have sandbox modified like that. if it is normal, i did not find any mention of it in the docs, and would ask if someone could kindly explain why?
thanks.
The text was updated successfully, but these errors were encountered: