Skip to content
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

extraMatchObjects() called outside vm sandboxing #123

Open
Omikhleia opened this issue Feb 8, 2017 · 1 comment
Open

extraMatchObjects() called outside vm sandboxing #123

Omikhleia opened this issue Feb 8, 2017 · 1 comment
Labels
Milestone

Comments

@Omikhleia
Copy link
Collaborator

In world-object-class-builder.js findNearby(), when extraMatchObjects on a location is a function, it is invoked directly. Since command parsing is done from the game engine and directly invoked from the player object in player-controller.js (via player.matchObjects()), the call is eventually performed outside vm sandboxing.

This is apparently the only case when in-world content is invoked outside the vm.

It seems it cannot break much things, being accessed through the Proxy from world-object-proxy-builder. Yet, it's not fully controlled, e.g. with the timeout other calls and hooks have - So an infinite loop for instance makes CPU going crazy.

This is probably not an easy issue, as matchObjects() may also be called from in-world content.

@doughsay
Copy link
Owner

doughsay commented Jun 1, 2017

I'll take a look at this as part of the 4.0.0 milestone

@doughsay doughsay added this to the 4.0.0 milestone Jun 1, 2017
@doughsay doughsay added the bug label Jun 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants