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

Check that the send function's "args" parameter is actually an object #226

Merged

Conversation

zoton2
Copy link
Collaborator

@zoton2 zoton2 commented Mar 4, 2021

Related Issue (if applicable):

#223

Description:

This adds a simple check to the send function to make sure the supplied arguments parameter is actually an object (excluding arrays) and throws an error if not.

Added because of the referenced issue above where the author was able to supply an array, which the JavaScript somehow attempts to convert into a (broken) object, which gets sent without a message-id, and then the plugin returns an error message but because there is no message-id the send function gets stuck/hangs.

Copy link
Collaborator

@Panger95 Panger95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes hanging because the malformed message sent doesn't send a message ID to obs-websocket.

@Panger95 Panger95 merged commit d481a1e into obs-websocket-community-projects:master Jun 12, 2021
duncte123 added a commit to duncte123/obs-websocket-js that referenced this pull request Jun 14, 2021
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.

None yet

2 participants