From fbd36e0c256cc8619445ad0c91599b5ab4a37219 Mon Sep 17 00:00:00 2001 From: erickgonzalez Date: Sun, 16 Jun 2024 20:33:14 -0600 Subject: [PATCH] private-issue 34 include in 23.10.24 LTS --- .../login/dot-login-component/dot-login.component.ts | 8 ++++++-- dotCMS/hotfix_tracking.md | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/core-web/apps/dotcms-ui/src/app/view/components/login/dot-login-component/dot-login.component.ts b/core-web/apps/dotcms-ui/src/app/view/components/login/dot-login-component/dot-login.component.ts index e7522f85380a..8f0d5f5d80db 100644 --- a/core-web/apps/dotcms-ui/src/app/view/components/login/dot-login-component/dot-login.component.ts +++ b/core-web/apps/dotcms-ui/src/app/view/components/login/dot-login-component/dot-login.component.ts @@ -2,7 +2,7 @@ import { Observable, Subject } from 'rxjs'; import { HttpErrorResponse } from '@angular/common/http'; import { Component, OnDestroy, OnInit } from '@angular/core'; -import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; +import { FormControl, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; import { ActivatedRoute, Params } from '@angular/router'; import { SelectItem } from 'primeng/api'; @@ -118,11 +118,15 @@ export class DotLoginComponent implements OnInit, OnDestroy { this.setInitialMessage(loginInfo); } + private isEmail(potentialEmail: string): boolean { + return !!new FormControl(potentialEmail, Validators.email).errors?.email; + } + private setInitialMessage(loginInfo: DotLoginInformation): void { this.route.queryParams.pipe(take(1)).subscribe((params: Params) => { if (params['changedPassword']) { this.setMessage(loginInfo.i18nMessagesMap['reset-password-success']); - } else if (params['resetEmailSent']) { + } else if (params['resetEmailSent'] && !this.isEmail(params['resetEmail'])) { this.setMessage( loginInfo.i18nMessagesMap['a-new-password-has-been-sent-to-x'].replace( '{0}', diff --git a/dotCMS/hotfix_tracking.md b/dotCMS/hotfix_tracking.md index 67fc69fc950e..4a459ec100e2 100644 --- a/dotCMS/hotfix_tracking.md +++ b/dotCMS/hotfix_tracking.md @@ -110,4 +110,5 @@ This maintenance release includes the following code fixes: 103. https://github.com/dotCMS/core/issues/28284 : Content Types not Showing if System is true #28284 104. https://github.com/dotCMS/core/issues/28306 : Can't Import Page Assets using the export file #28306 105. https://github.com/dotCMS/core/issues/28352 : Send Email sub-action doesn't set the current user to $dotcontent viewtool #28352 -106. https://github.com/dotCMS/core/issues/28689 : Update LTS Telemetry plugin #28689 \ No newline at end of file +106. https://github.com/dotCMS/core/issues/28689 : Update LTS Telemetry plugin #28689 +107. https://github.com/dotCMS/private-issues/issues/34 \ No newline at end of file