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

Robustness issue in get-xxx and/or save-xxx socket commands #171

Open
Omikhleia opened this issue Jun 25, 2017 · 0 comments
Open

Robustness issue in get-xxx and/or save-xxx socket commands #171

Omikhleia opened this issue Jun 25, 2017 · 0 comments
Labels

Comments

@Omikhleia
Copy link
Collaborator

Version: checked on 4.x (but probably applicable to 3.x too)

Steps to reproduce:

  • eval someobject.crashTest = Verb("crashme");
  • Ctrl-P and edit the newly created verb
  • Break the function code (i.e. either empty the whole file, or just garble the function declaration to be incorrect, etc.)
  • Save and close editor
  • Ctrl-P and try to open the verb

Observed behavior:

Game engine crashes and terminates:

SyntaxError: Unexpected token )
    at Deserializer.deserialize (...room.js-server\src\lib\deserializer.js...)
    at Handler.get (D:\dev\room.js-server\src\lib\world-object-proxy-builder.js...)
    at ProgrammerController.onGetVerb (...room.js-server\src\controllers\programmer-controller.js...)
    at SocketController.onGetVerb (...room.js-server\src\controllers\socket-controller.js...)

Only workaround is to fix the offending file on-disk before relaunching the game engine.

There ought to be some robustness checks:

  • so that programmers can't that easily crash the engine due to programming mistakes.
  • Additionally, to also prevent mis-behaving clients from crashing the engine (e.g. not sending the expected JSON payload, due to bugs etc. Err... that's initially how I stumbled on that issue ^^)
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

1 participant