Add verification for password hint - the hint should not equal the password for security reasons (#194)

This commit is contained in:
Cedric Wille 2020-12-15 16:04:48 -05:00 committed by GitHub
parent d7b5f0a26b
commit f7d8887304
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -112,6 +112,11 @@ export class RegisterComponent {
}
}
if (this.hint === this.masterPassword) {
this.platformUtilsService.showToast('error', this.i18nService.t('errorOccurred'), this.i18nService.t('hintEqualsPassword'));
return;
}
this.name = this.name === '' ? null : this.name;
this.email = this.email.trim().toLowerCase();
const kdf = KdfType.PBKDF2_SHA256;