mozilla-services / autopush

Python Web Push Server used by Mozilla
https://autopush.readthedocs.io/
Mozilla Public License 2.0
217 stars 34 forks source link

catch int(jwt['exp']) raising TypeErrors #1326

Closed pjenvey closed 5 years ago

pjenvey commented 5 years ago

Seen on sentry:

https://sentry.prod.mozaws.net/operations/autopush-prod/issues/5490142/

Any type could be embedded in the jwt JSON, e.g. a list. We already catch ValueErrors from int() but it could additionally raise a TypeError on incorrect types