gauntface / web-push-go

Apache License 2.0
99 stars 14 forks source link

Panic for invalid keys #12

Closed pinarx closed 8 years ago

pinarx commented 8 years ago

If invalid (but base64 decodable) encryption keys are provided, sharedSecret method panics. Now, this can happen in 2 sceneraios:

1) Developer specifies invalid keys (which is not very exceptional) 2) PushSubscription contains invalid encryption keys (which shouldn't happen much)

Should the panic be resolved in the encryption library since the developers specifying bad input seems more likely?