return / branca

Authenticated and encrypted API tokens written in Rust. A secure JWT alternative.

Home Page:https://branca.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add error for an overflowing operation on TTL and timestamp

brycx opened this issue · comments

I think it would be best to return an error, instead of panic, when ttl + timestamp would overflow. Otherwise, someone might construct tokens with the timestamp maximum value to have the validating side panic on each parsing (if validating side sets non-zero ttl).