From 7181ec7660e3f90f2f87a0f1d08591ad02c87c32 Mon Sep 17 00:00:00 2001 From: Purushotam Date: Thu, 21 Mar 2024 12:40:29 +0530 Subject: [PATCH 1/3] 119118-added encoding method for error message --- .../public/module/signup/components/otp/otp.component.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/client/src/app/modules/public/module/signup/components/otp/otp.component.ts b/src/app/client/src/app/modules/public/module/signup/components/otp/otp.component.ts index a70da486f72..96c81cefeb1 100644 --- a/src/app/client/src/app/modules/public/module/signup/components/otp/otp.component.ts +++ b/src/app/client/src/app/modules/public/module/signup/components/otp/otp.component.ts @@ -142,7 +142,14 @@ export class OtpComponent implements OnInit { this.logVerifyOtpError(err.error.params.errmsg); this.telemetryService.interact(this.generateVerifyOtpErrorInteractEdata); if (_.get(err, 'error.result.remainingAttempt') === 0) { - this.utilService.redirectToLogin(this.resourceService.messages.emsg.m0050); + + let dynamicKey = Math.random().toString(36).substring(2, 15); + let messageValue = this.resourceService.messages.emsg.m0050; + let final_value = `${dynamicKey} value${messageValue} second ${dynamicKey}`; + let encodedValue = btoa(final_value); + console.log("encodedValue", encodedValue); + this.utilService.redirectToLogin(encodedValue); // this.resourceService.messages.emsg.m0050; + } else { this.infoMessage = ''; this.otpForm.controls.otp.setValue(''); From 0df5312e4f09320d5a4d84740b8800825cc17945 Mon Sep 17 00:00:00 2001 From: Purushotam Date: Mon, 1 Apr 2024 14:05:10 +0530 Subject: [PATCH 2/3] error-message-encoding-decoding for otp --- .../components/otp-popup/otp-popup.component.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/client/src/app/modules/shared-feature/components/otp-popup/otp-popup.component.ts b/src/app/client/src/app/modules/shared-feature/components/otp-popup/otp-popup.component.ts index 1134f591e69..42c680cb319 100644 --- a/src/app/client/src/app/modules/shared-feature/components/otp-popup/otp-popup.component.ts +++ b/src/app/client/src/app/modules/shared-feature/components/otp-popup/otp-popup.component.ts @@ -106,10 +106,17 @@ export class OtpPopupComponent implements OnInit, OnDestroy { }, (err) => { if (_.get(err, 'error.result.remainingAttempt') === 0) { + + let dynamicKey = Math.random().toString(36).substring(2, 15); + let messageValue = this.resourceService.messages.emsg.m0050; + let final_value = `${dynamicKey} value${messageValue} second ${dynamicKey}`; + let encodedValue = btoa(final_value); + console.log("popup encodedValue", encodedValue); + if (this.redirectToLogin) { - this.utilService.redirectToLogin(this.resourceService.messages.emsg.m0050); + this.utilService.redirectToLogin(encodedValue); // this.resourceService.messages.emsg.m0050 } else { - this.toasterService.error(this.resourceService.messages.emsg.m0050); + this.toasterService.error(encodedValue); // this.resourceService.messages.emsg.m0050 this.closeContactForm.emit('true'); } } else { From ad529a2e9e062f416ed286944f07caf330a1d4a2 Mon Sep 17 00:00:00 2001 From: Purushotam Date: Mon, 1 Apr 2024 18:06:05 +0530 Subject: [PATCH 3/3] added encoded OTP message --- .../verify-account-identifier.component.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/client/src/app/modules/recover-account/components/verify-account-identifier/verify-account-identifier.component.ts b/src/app/client/src/app/modules/recover-account/components/verify-account-identifier/verify-account-identifier.component.ts index 5898e3c9de3..d20bd7518e9 100644 --- a/src/app/client/src/app/modules/recover-account/components/verify-account-identifier/verify-account-identifier.component.ts +++ b/src/app/client/src/app/modules/recover-account/components/verify-account-identifier/verify-account-identifier.component.ts @@ -121,8 +121,15 @@ export class VerifyAccountIdentifierComponent implements OnInit { } handleError(err) { if (_.get(err, 'error.result.remainingAttempt') === 0) { + + let dynamicKey = Math.random().toString(36).substring(2, 15); + let messageValue = this.resourceService.messages.emsg.m0050; + let final_value = `${dynamicKey} value${messageValue} second ${dynamicKey}`; + let encodedValue = btoa(final_value); + console.log("verify account identifier encodedValue", encodedValue); + this.disableFormSubmit = true; - this.utilService.redirectToLogin(this.resourceService.messages.emsg.m0050); + this.utilService.redirectToLogin(encodedValue); // this.resourceService.messages.emsg.m0050 } else { const filterPipe = new InterpolatePipe(); const errorMessage =