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

Password reset token is hilariously insecure #69

Open
mithrandi opened this issue Aug 10, 2018 · 0 comments
Open

Password reset token is hilariously insecure #69

mithrandi opened this issue Aug 10, 2018 · 0 comments
Labels

Comments

@mithrandi
Copy link
Contributor

This code:

return unicode(hashlib.md5(str((usern, time.time(), random.random()))).hexdigest())

This should just use urandom. As it stands, I think an attacker can obtain one of these tokens and reverse it to get the state of the random.random() generator, then brute-force somebody else's token with a relatively tiny number of attempts.

@mithrandi mithrandi added the bug label Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant