mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-09 17:23:04 +03:00
[PR #4067] [MERGED] Add Protected Actions Check #2889
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/4067
Author: @BlackDex
Created: 11/12/2023
Status: ✅ Merged
Merged: 11/13/2023
Merged by: @dani-garcia
Base:
main← Head:add_protected_actions_check📝 Commits (1)
a7abb44Add Protected Actions Check📊 Changes
16 files changed (+337 additions, -124 deletions)
View changed files
📝
src/api/core/accounts.rs(+13 -24)📝
src/api/core/ciphers.rs(+4 -8)📝
src/api/core/organizations.rs(+13 -17)📝
src/api/core/two_factor/authenticator.rs(+11 -10)📝
src/api/core/two_factor/duo.rs(+13 -10)📝
src/api/core/two_factor/email.rs(+19 -12)📝
src/api/core/two_factor/mod.rs(+14 -10)➕
src/api/core/two_factor/protected_actions.rs(+142 -0)📝
src/api/core/two_factor/webauthn.rs(+28 -18)📝
src/api/core/two_factor/yubikey.rs(+11 -9)📝
src/api/mod.rs(+26 -2)📝
src/config.rs(+5 -4)📝
src/db/models/two_factor.rs(+3 -0)📝
src/mail.rs(+13 -0)➕
src/static/templates/email/protected_action.hbs(+6 -0)➕
src/static/templates/email/protected_action.html.hbs(+16 -0)📄 Description
Since the feature
Login with devicesome actions done via the web-vault need to be verified via an OTP instead of providing the MasterPassword.This only happens if a user used the
Login with deviceon a device which uses either Biometrics login or PIN. These actions prevent the athorizing device to send the MasterPasswordHash. When this happens, the web-vault requests an OTP to be filled-in and this OTP is send to the users email address which is the same as the email address to login.The only way to bypass this is by logging in with the your password, in those cases a password is requested instead of an OTP.
In case SMTP is not enabled, it will show an error message telling to user to login using there password.
Fixes #4042
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.