From f7d8887304daa8c7e19890083999dbf7e719abd5 Mon Sep 17 00:00:00 2001 From: Cedric Wille Date: Tue, 15 Dec 2020 16:04:48 -0500 Subject: [PATCH] Add verification for password hint - the hint should not equal the password for security reasons (#194) --- src/angular/components/register.component.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/angular/components/register.component.ts b/src/angular/components/register.component.ts index a0f49cf5f1..6149f83f16 100644 --- a/src/angular/components/register.component.ts +++ b/src/angular/components/register.component.ts @@ -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;