Closed HuFlungDu closed 4 weeks ago
thanks for this, amazingly, we already have a catch in place for the meshagent ws but not web clients https://github.com/Ylianst/MeshCentral/blob/141bec559fb291a0f361826d3000851a118e08cb/meshagent.js#L577
linked issue here showing the same thing but for meshagents https://github.com/Ylianst/MeshCentral/issues/6463
In some cases, a client could send packets that would cause the webserver to error and crash. In my case, I was getting the error:
Whatever WS handler this is propagating to is not handling the "error" event on the ws object. I couldn't track it down since this only happens in production for me, so I can't replicate it in a safe environment for testing.
While this is error is definitely worth tracking down itself (#5433?), the server should also never crash due to bad client input. This creates a failsafe in the case there is an unhandled error