mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-05-12 14:43:56 +00:00
Fix Key Rotation during password change
When ticking the 'Also rotate my account's encryption key' box, the key rotated ciphers are posted after the change of password. During the password change the security stamp was reseted which made the posted key's return an invalid auth. This reset is needed to prevent other clients from still being able to read/write. This fixes this by adding a new database column which stores a stamp exception which includes the allowed route and the current security stamp before it gets reseted. When the security stamp check fails it will check if there is a stamp exception and tries to match the route and security stamp. Currently it only allows for one exception. But if needed we could expand it by using a Vec<UserStampException> and change the functions accordingly. fixes #1240
This commit is contained in:
parent
e38771bbbd
commit
de86aa671e
13 changed files with 83 additions and 18 deletions
|
@ -136,6 +136,7 @@ table! {
|
|||
totp_secret -> Nullable<Text>,
|
||||
totp_recover -> Nullable<Text>,
|
||||
security_stamp -> Text,
|
||||
stamp_exception -> Nullable<Text>,
|
||||
equivalent_domains -> Text,
|
||||
excluded_globals -> Text,
|
||||
client_kdf_type -> Integer,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue