1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-10 00:05:42 +02:00

All: When resetting the master password, also create a new master key with that password

This commit is contained in:
Laurent Cozic
2023-05-31 20:31:44 +01:00
parent 577aa519e0
commit e647775608
2 changed files with 9 additions and 0 deletions

View File

@ -311,6 +311,10 @@ export async function resetMasterPassword(encryptionService: EncryptionService,
}
Setting.setValue('encryption.masterPassword', newPassword);
const masterKey = await encryptionService.generateMasterKey(newPassword);
await MasterKey.save(masterKey);
await loadMasterKeysFromSettings(encryptionService);
}
export enum MasterPasswordStatus {