googlearchive / web-push-encryption

[Deprecated] Encryption Utilities for Web Push protocol
Apache License 2.0
84 stars 23 forks source link

check input earlier to prevent misuse #55

Closed samthor closed 7 years ago

samthor commented 8 years ago

Currently the code sanity-checks e.g. Array (since it has a .length property) but silently doesn't send non-string/etc data.

I could probably move this around (and make encrypt() only take a Buffer) to reduce code reuse but that would involve fixing lots of tests. Let me know if that's preferred.