You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the ssx-server-dev container described in the <repo>/docker-compose.yml to attempt to do local development. I've removed the front-end in order to use my own from the docker-compose.yml, so my file looks like:
If I refresh the client app, then log in again, it crashes with the message:
ssx-server-dev | /root/ssx/packages/ssx-server/dist/middlewares/express/middleware.js:59
ssx-server-dev | const { success: verified, data } = siweMessageVerify;
ssx-server-dev | ^
ssx-server-dev |
ssx-server-dev | TypeError: Cannot destructure property 'success' of 'siweMessageVerify' as it is undefined.
ssx-server-dev | at /root/ssx/packages/ssx-server/dist/middlewares/express/middleware.js:59:30
ssx-server-dev | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
ssx-server-dev |
ssx-server-dev | Node.js v18.12.1
ssx-server-dev exited with code 1
This is consistently reproducible.
Expected Behavior
The ssx-server-dev container can handle a second user logging in or a malformed message without crashing.
Steps To Reproduce
Clone the repo.
Run the docker container
Visit the app
Log in
Refresh the app
Log in again
Anything else?
One major issue is that de-structuring an undefined property in JavaScript causes an unrecoverable error and program wide crash. De-structuring without validation is always going to risk making a recoverable error into a fatal one.
I think we should strive to make them recoverable, in the sense that one malformed message from one user doesn't crash the whole system for other users. That way a useful error can be returned in the case of accidental malformed messages and the system is not vulnerable to one bad message being enough to launch a DoS attack.
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Current Behavior
I'm using the
ssx-server-dev
container described in the<repo>/docker-compose.yml
to attempt to do local development. I've removed the front-end in order to use my own from thedocker-compose.yml
, so my file looks like:The container works for the first log in. The container outputs the following log:
If I refresh the client app, then log in again, it crashes with the message:
This is consistently reproducible.
Expected Behavior
The ssx-server-dev container can handle a second user logging in or a malformed message without crashing.
Steps To Reproduce
Anything else?
One major issue is that de-structuring an
undefined
property in JavaScript causes an unrecoverable error and program wide crash. De-structuring without validation is always going to risk making a recoverable error into a fatal one.I think we should strive to make them recoverable, in the sense that one malformed message from one user doesn't crash the whole system for other users. That way a useful error can be returned in the case of accidental malformed messages and the system is not vulnerable to one bad message being enough to launch a DoS attack.
The text was updated successfully, but these errors were encountered: