Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

"exp" > 24 hours does not result in an error. #794

Closed
gauntface opened this issue Jan 30, 2017 · 2 comments
Closed

"exp" > 24 hours does not result in an error. #794

gauntface opened this issue Jan 30, 2017 · 2 comments
Assignees
Labels

Comments

@gauntface
Copy link

gauntface commented Jan 30, 2017

If I set an expiration to something greater than 24 hours (i.e. 48 hours) in the VAPID JWT, I'm not receiving an error which I think it's meant to:

An "exp" (Expiry) claim MUST be included with the time after which
the token expires. This limits the time that a token over which a
token is valid. An "exp" claim MUST NOT be more than 24 hours
from the time of the request.

@jrconlin
Copy link
Member

We are a bit lax on this because we want to encourage folks to use VAPID. Right now, folks are struggling to just get the encryption right (we see a lot of that from the logs). Considering the fun of clock skew and time sync errors, we decided to remove one hurdle.

Yes, this does expose folks to potential replay errors against themselves, however the actual incidence of this is very low. We do expect to start enforcing the standard once it is finalized.

@gauntface
Copy link
Author

Ta for the info :) 👍

@bbangert bbangert added this to the PUSHSVC-0: quality milestone Feb 6, 2017
bbangert added a commit that referenced this issue Feb 9, 2017
We now attempt to coerce the jwt exp value in case it wasn't an int
and verify that it is within the next 24 hours and has not already
expired.

Closes #794
@bbangert bbangert self-assigned this Feb 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants