Use user ID in password reset route in order to properly compare token hashes.

This commit is contained in:
mikestefanello 2021-12-16 19:49:33 -05:00
parent e6a5fa58c7
commit b383be5dac
6 changed files with 40 additions and 24 deletions

View file

@ -61,7 +61,7 @@ func (l *Login) Post(c echo.Context) error {
u, err := l.Container.ORM.User.
Query().
Where(user.Email(form.Email)).
First(c.Request().Context())
Only(c.Request().Context())
if err != nil {
switch err.(type) {