Skip to content

fix: Don’t leak STRIP_TRANSIENTS action#961

Merged
delucis merged 2 commits into
mainfrom
delucis/fix/strip-transients-leak
Jul 19, 2021
Merged

fix: Don’t leak STRIP_TRANSIENTS action#961
delucis merged 2 commits into
mainfrom
delucis/fix/strip-transients-leak

Conversation

@delucis
Copy link
Copy Markdown
Member

@delucis delucis commented Jul 19, 2021

#940 introduced an internal STRIP_TRANSIENTS action that strips error state from the final reducer output, so it can be used to trigger side effects. This action type was being included in the actions forwarded by the client to multiplayer transports. Because this action does not have a payload field, this caused the master to crash in various places were it assumed a payload object would be defined.

This PR adds logic to ignore the STRIP_TRANSIENTS object when forwarding actions to multiplayer transports.

For robustness, it also allows the master to gracefully handle cases where it receives an undefined action or action.payload as in theory crashing on undefined user input could be an attack vector.


CC: @shaoster
Reported on Gitter by @kevinddchen

delucis added 2 commits July 19, 2021 11:14
Return error instead of crashing when the master receives an undefined action or an action without a `payload` field.
@delucis delucis merged commit 9753c0e into main Jul 19, 2021
@delucis delucis deleted the delucis/fix/strip-transients-leak branch July 19, 2021 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant