HomeWildfire Games

Prevent the lobby gamelist from breaking entirely if a gamestanza contains an…

Description

Prevent the lobby gamelist from breaking entirely if a gamestanza contains an empty or invalid mod version JSON string (refs rP21301).

Catch all JSON SyntaxError exceptions in JS (refs rP18534).
The C++ ParseJSON function already catches exceptions and the resulting errors can't trigger a denial of service.

Differential Revision: https://code.wildfiregames.com/D1479
Based on patch by: Imarok
Reviewed by: Imarok
Comments By: Itms

Details

Committed
elexisMay 27 2018, 3:47 PM
Reviewer
Imarok
Differential Revision
D1479: Lobby: Ignore games with no valid modentry
Parents
rP21826: Revert 21825, it violates current freezes
Branches
Unknown
Tags
Unknown
Build Status
Buildable 6162
Build 10247: Post-Commit BuildJenkins

Event Timeline

elexis added a comment.Sep 8 2018, 5:46 PM

I assumed it would work like this:

  1. start lobby match.
  2. disconnect from the lobby. lobby bot unregisters the game.
  3. open lobby dialog.
  4. answer with "yes" to rejoin the lobby
  5. some player disconnected (or joined via IP)
  6. server send ChangeGameState to the lobby bot. lobby bot displays a lobby game with all null entries?

The lobby-dialog reconnect mechanism is new in alpha 23 and would explain why this is a newly observed behavior.
One host who had such a lobby game also experienced that he disconnected from the lobby and rejoined it with the dialog.
But I could not reproduce the issue with these steps.