mozilla-services / autopush

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

Do not include empty, optional fields in push notifications #1392

Open jrconlin opened 4 years ago

jrconlin commented 4 years ago

Client was dropping some messages that don't have con data, which can happen with aes128gcm encoded data content. We should not include empty fields if they're optional.

jrconlin commented 4 years ago

Ok, so this is a really weird one. Autopush is plenty clear about only allowing valid content-encoding headers through and gleefully returns 400 if it gets something bad.

autopush should not let a blank 'con' go through unless the message has no data. Working with @jonalmeida to sort out what's going on here.