mirror of
https://github.com/bitwarden/browser
synced 2026-02-10 13:40:06 +00:00
[PM-27086] add validation to properties before using them
This commit is contained in:
@@ -235,6 +235,9 @@ export class SetInitialPasswordComponent implements OnInit {
|
||||
*
|
||||
* This is a temporary state. The end-goal will be to use KM's V2Encryption method above.
|
||||
*/
|
||||
const ctx = "Could not set initial password.";
|
||||
assertTruthy(passwordInputResult.newPassword, "newPassword", ctx);
|
||||
assertNonNullish(passwordInputResult.kdfConfig, "kdfConfig", ctx);
|
||||
|
||||
const newMasterKey = await this.keyService.makeMasterKey(
|
||||
passwordInputResult.newPassword,
|
||||
|
||||
Reference in New Issue
Block a user