[PR #3390] Fix abort on pw reset mail error #3015

Open
opened 2025-10-09 18:15:36 +03:00 by OVERLORD · 0 comments
Owner

Original Pull Request: https://github.com/dani-garcia/vaultwarden/pull/3390

State: closed
Merged: Yes


There was used a wrong macro to produce an error message when mailing
the user his password was reset failed. It was using error!() which
does not return an Err and aborts the rest of the code.

This resulted in the users password still being resetted, but not being
notified. This PR fixes this by using err!(). Also, do not set the
user object as mutable until it really is needed.

Second, when a user was using the new Argon2id KDF with custom values
like memory and parallelism, that would have rendered the password
incorrect. The endpoint which should return all the data did not
returned all the new Argon2id values. (Thanks to @stefan0xC for spotting the specific culprit).

Fixes #3388

**Original Pull Request:** https://github.com/dani-garcia/vaultwarden/pull/3390 **State:** closed **Merged:** Yes --- There was used a wrong macro to produce an error message when mailing the user his password was reset failed. It was using `error!()` which does not return an `Err` and aborts the rest of the code. This resulted in the users password still being resetted, but not being notified. This PR fixes this by using `err!()`. Also, do not set the user object as mutable until it really is needed. Second, when a user was using the new Argon2id KDF with custom values like memory and parallelism, that would have rendered the password incorrect. The endpoint which should return all the data did not returned all the new Argon2id values. (Thanks to @stefan0xC for spotting the specific culprit). Fixes #3388
OVERLORD added the pull-request label 2025-10-09 18:15:36 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#3015