mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-09 09:51:02 +01:00
Set HashPurpose.LocalAuthorization on export password check (#339)
This commit is contained in:
parent
fc2f4d1a3e
commit
10b4efcb0d
@ -27,9 +27,7 @@ export class ExportCommand {
|
|||||||
return Response.badRequest('Master password is required.');
|
return Response.badRequest('Master password is required.');
|
||||||
}
|
}
|
||||||
|
|
||||||
const keyHash = await this.cryptoService.hashPassword(password, null);
|
if (await this.cryptoService.compareAndUpdateKeyHash(password, null)) {
|
||||||
const storedKeyHash = await this.cryptoService.getKeyHash();
|
|
||||||
if (storedKeyHash != null && keyHash != null && storedKeyHash === keyHash) {
|
|
||||||
let format = options.format;
|
let format = options.format;
|
||||||
if (format !== 'encrypted_json' && format !== 'json') {
|
if (format !== 'encrypted_json' && format !== 'json') {
|
||||||
format = 'csv';
|
format = 'csv';
|
||||||
|
Loading…
Reference in New Issue
Block a user