Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snyk alert issue fixed #1176

Merged
merged 1 commit into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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<UIState>,
private mfaService: MFAService, private authService: AuthService,
protected viewportScroller: ViewportScroller, protected scrollHelper: ScrollHelper) {
Expand All @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down