Branca builder incorrectly sets timestamp to non-zero on new()
brycx opened this issue · 0 comments
brycx commented
The Branca builder sets the timestamp
to the current system time when calling new()
:
Line 201 in 94725c9
But encode()
then checks if it is non-zero. If it is zero, it uses the current system time to encode the token. If it is not zero, it uses the timestamp
field of the Branca
struct:
Line 278 in 94725c9
This means, if an instance of Branca
is created at one point, and some given time later is used to encode a token, the token would use the timestamp of when the instance was created, not when the token was created.