Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Don't throw in the server on certain unsub messages #54

Merged
merged 1 commit into from Jan 10, 2017

Conversation

glasser
Copy link
Member

@glasser glasser commented Dec 22, 2016

To use an object as a map with arbitrary keys, you should either use
Object.create(null) or the Map class. Otherwise you can run into trouble
where keys like toString and constructor are in your app too. If the server
received such a message, an exception would get thrown within
SubscriptionManager.unsubscribe.

Noticed while reviewing @Urigo 's PR

To use an object as a map with arbitrary keys, you should either use
`Object.create(null)` or the `Map` class.  Otherwise you can run into trouble
where keys like `toString` and `constructor` are in your app too.  If the server
received such a message, an exception would get thrown within
SubscriptionManager.unsubscribe.
@helfer
Copy link
Contributor

helfer commented Jan 10, 2017

Thanks @glasser!

@helfer helfer merged commit 4629253 into master Jan 10, 2017
@dotansimha dotansimha deleted the glasser/safer-unsub branch June 12, 2017 08:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants