-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Address insecure sub header fetch. #803
Conversation
When insecurely getting the `sub` for tracking and errors, we were not properly decoding. This was resulting in a VAPID error being generated. This should not impact processing, but was generating a lot of logging messages. * FCM would reject TTLS > that 4 weeks, which is less than our 30 day max. Added a specific filter for that. * fixed some spelling mistakes. Closes: SYNC-4514
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for doing this! Just a few minor things.
autopush-common/src/lib.rs
Outdated
@@ -44,7 +44,10 @@ pub mod util; | |||
/// "abandoned" and any router info assigned to a User Agent that has not contacted | |||
/// Autopush in 60 days can be discarded. | |||
/// | |||
const ONE_DAY: u64 = 24 * 60 * 60; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's pretty clear from the surrounding comments that it's seconds, but maybe just for sanity: a docstring stating this is in seconds, opposed to renaming something like ONE_DAY_IN_SECONDS
, just like the other consts below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
When insecurely getting the
sub
for tracking and errors, we were notproperly decoding. This was resulting in a VAPID error being generated.
This should not impact processing, but was generating a lot of logging
messages.
FCM would reject TTLS > that 4 weeks, which is less than
our 30 day max. Added a specific filter for that.
fixed some spelling mistakes.
Closes: SYNC-4514