From c04eef4835a66b2ce7daf0a56e59845ef7c6e1a1 Mon Sep 17 00:00:00 2001 From: ajithmuthukumar-bc Date: Mon, 19 Dec 2022 20:41:11 +0530 Subject: [PATCH] snyk alert issue fixed --- .../send-notification/send-mfa-reset-notification.ts | 5 +++-- src/environments/environment.ts | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/pages/mfa-reset/send-notification/send-mfa-reset-notification.ts b/src/app/pages/mfa-reset/send-notification/send-mfa-reset-notification.ts index 4ff08c10b..00ca4769e 100644 --- a/src/app/pages/mfa-reset/send-notification/send-mfa-reset-notification.ts +++ b/src/app/pages/mfa-reset/send-notification/send-mfa-reset-notification.ts @@ -8,6 +8,7 @@ import { ActivatedRoute, Router } from '@angular/router'; import { AuthService } from 'src/app/services/auth/auth.service'; import { MFAService } from 'src/app/services/auth/mfa.service'; import { SessionStorageKey } from 'src/app/constants/constant'; +import { environment } from 'src/environments/environment'; @Component({ @@ -18,7 +19,7 @@ import { SessionStorageKey } from 'src/app/constants/constant'; export class SendMFAResetNotificationComponent extends BaseComponent implements OnInit { sendError: boolean = false; userName: string = ''; - + protected mailDecryptKey = environment.mailDecryptKey constructor(private route: ActivatedRoute, private router: Router, protected uiStore: Store, private mfaService: MFAService, private authService: AuthService, protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) { @@ -32,7 +33,7 @@ export class SendMFAResetNotificationComponent extends BaseComponent implements ngOnInit() { this.route.queryParams.subscribe(para => { if (para.u && para.u !== '') { - var decryptedValue = CryptoJS.AES.decrypt(decodeURIComponent(para.u), 'conclavesimpleemailencrypt'); + var decryptedValue = CryptoJS.AES.decrypt(decodeURIComponent(para.u), this.mailDecryptKey); var originalUsername = decryptedValue.toString(CryptoJS.enc.Utf8); this.userName = originalUsername; sessionStorage.setItem(SessionStorageKey.MFAResetUserName, originalUsername); diff --git a/src/environments/environment.ts b/src/environments/environment.ts index ab2beda48..a94129925 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -33,6 +33,7 @@ export const environment = { bulkUploadMaxFileSizeInBytes:1048576,//default value usedPasswordThreshold: 5, //This value should be changed when Auth0 password history policy changed, listPageSize: 10, + mailDecryptKey:'', rollbar: { key: '', enable: false,