Skip to content

Commit

Permalink
private-issue 34 include in 23.10.24 LTS
Browse files Browse the repository at this point in the history
  • Loading branch information
erickgonzalez committed Jun 17, 2024
1 parent 3b05d39 commit fbd36e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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}',
Expand Down
3 changes: 2 additions & 1 deletion dotCMS/hotfix_tracking.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
106. https://github.com/dotCMS/core/issues/28689 : Update LTS Telemetry plugin #28689
107. https://github.com/dotCMS/private-issues/issues/34

0 comments on commit fbd36e0

Please sign in to comment.