Skip to content
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

Fix time::Instant underflow in handshake #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pinkisemils
Copy link

On macOS, time::Instant::now() - time::Duration::from_secs(86400) would panic due to an underflow if the machine was running for less than 24 hours. This of course is not ideal, as that expression is used to initialize the cookie validator. I've worked around this by making the birth of the secret optional, and just assume that a secret without a birthday is invalid. This could also be changed to have the secret itself be optional.

@pinkisemils pinkisemils changed the title Fix time::Instant in handshake Fix time::Instant underflow in handshake Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant