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

Stale OneUseStore nonces never release memory #18

Closed
clagraff opened this issue May 24, 2018 · 3 comments
Closed

Stale OneUseStore nonces never release memory #18

clagraff opened this issue May 24, 2018 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@clagraff
Copy link
Owner

When using the OneUseStore, nonces can be generated without having any method of forcing their removal. This means an attacker could continue to make unauthenticated requests in order to generate more nonces which will never be removed, thus eating away at the servers resources.

@clagraff clagraff added the bug Something isn't working label May 24, 2018
@clagraff
Copy link
Owner Author

clagraff commented Jul 3, 2018

This would also affect the LimitedUseStore that is currently in progress.

@clagraff
Copy link
Owner Author

clagraff commented Dec 4, 2018

Here is how it should be handled: There should be one Store type, which takes a limit amount and a duration amount.
Have a coroutine clear our expired tokens, and add all the rest of the functionality.
store := NonceFactory(3, 1 * time.Second) could return a store which limits nonce to a lifetime of 1 second and a usage-limit of 3.

@clagraff clagraff self-assigned this Dec 7, 2018
@clagraff clagraff modified the milestone: 1.0.0 Dec 7, 2018
@clagraff
Copy link
Owner Author

clagraff commented Dec 7, 2018

Addressed ☑️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant