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

attemptReset does not check for token existance before resetting passwd #79

Closed
fefo-p opened this issue Aug 22, 2019 · 1 comment
Closed

Comments

@fefo-p
Copy link
Contributor

fefo-p commented Aug 22, 2019

Just adding a second 'where' condition will do:
$user = $users->where('email', $this->request->getPost('email'))->where('reset_hash', $this->request->getPost('token'))->first();

On the other hand, what's the logic you thought for "reset-time" field in DB?
I guess it'd mean that you could put a certain amount of minutes of token validity that could be checked just after the $user = $user->where()...->first() above. Am I right?

@fefo-p
Copy link
Contributor Author

fefo-p commented Aug 22, 2019

As it is now, it allows infinite password resets, even with no valid token

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant