mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
[PM-1593] send password as null if it is not in state (#5634)
This commit is contained in:
@@ -304,13 +304,16 @@ export class AuthService implements AuthServiceAbstraction {
|
|||||||
).encKey,
|
).encKey,
|
||||||
pubKey.buffer
|
pubKey.buffer
|
||||||
);
|
);
|
||||||
const encryptedMasterPassword = await this.cryptoService.rsaEncrypt(
|
let encryptedMasterPassword = null;
|
||||||
|
if ((await this.stateService.getKeyHash()) != null) {
|
||||||
|
encryptedMasterPassword = await this.cryptoService.rsaEncrypt(
|
||||||
Utils.fromUtf8ToArray(await this.stateService.getKeyHash()),
|
Utils.fromUtf8ToArray(await this.stateService.getKeyHash()),
|
||||||
pubKey.buffer
|
pubKey.buffer
|
||||||
);
|
);
|
||||||
|
}
|
||||||
const request = new PasswordlessAuthRequest(
|
const request = new PasswordlessAuthRequest(
|
||||||
encryptedKey.encryptedString,
|
encryptedKey.encryptedString,
|
||||||
encryptedMasterPassword.encryptedString,
|
encryptedMasterPassword?.encryptedString,
|
||||||
await this.appIdService.getAppId(),
|
await this.appIdService.getAppId(),
|
||||||
requestApproved
|
requestApproved
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user