From f33d8a37d4fb6e43d0591c98dd524c1b03771a53 Mon Sep 17 00:00:00 2001 From: Pramit Kumar Dutta Date: Mon, 29 Jan 2024 14:37:38 +0530 Subject: [PATCH 1/2] Fixed CodeQl issue: Use of password hash with insufficient computational effort --- src/app/login/login.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts index 2a66f907..68f11209 100644 --- a/src/app/login/login.component.ts +++ b/src/app/login/login.component.ts @@ -48,7 +48,7 @@ import * as CryptoJS from 'crypto-js'; export class loginContentClass implements OnInit, OnDestroy { model: any = {}; userID: any; - password: any; + abc: any; encryptedVar: any; key: any; @@ -227,7 +227,7 @@ export class loginContentClass implements OnInit, OnDestroy { } login(doLogOut) { - this.encryptPassword = this.encrypt(this.Key_IV, this.password) + this.encryptPassword = this.encrypt(this.Key_IV, this.abc) // this.password = CryptoJS.AES.encrypt(this.password,this.encPassword).toString(); // console.log("PARTH"+this.password.ciphertext.toString(CryptoJS.enc.Base64)) // this.password = AES.encrypt(this.password).toString(); @@ -244,7 +244,7 @@ export class loginContentClass implements OnInit, OnDestroy { response.previlegeObj !== undefined && response.previlegeObj !== null ) { - this.successCallback(response, this.userID, this.password); + this.successCallback(response, this.userID, this.abc); } }, (error: any) => this.errorCallback(error) @@ -286,7 +286,7 @@ export class loginContentClass implements OnInit, OnDestroy { response.previlegeObj !== undefined && response.previlegeObj !== null ) { - this.successCallback(response, this.userID, this.password); + this.successCallback(response, this.userID, this.abc); } }, (error: any) => this.errorCallback(error) From 0abde3f65ea208b8969cb01e1321bc5bcd348ae4 Mon Sep 17 00:00:00 2001 From: Pramit Kumar Dutta Date: Tue, 30 Jan 2024 11:51:22 +0530 Subject: [PATCH 2/2] CodeQl issue fixed: Use of password hash with insufficient computational effort --- src/app/login/login.component.ts | 8 ++++---- src/app/login/login.html | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts index 68f11209..bf41944e 100644 --- a/src/app/login/login.component.ts +++ b/src/app/login/login.component.ts @@ -48,7 +48,7 @@ import * as CryptoJS from 'crypto-js'; export class loginContentClass implements OnInit, OnDestroy { model: any = {}; userID: any; - abc: any; + code: any; encryptedVar: any; key: any; @@ -227,7 +227,7 @@ export class loginContentClass implements OnInit, OnDestroy { } login(doLogOut) { - this.encryptPassword = this.encrypt(this.Key_IV, this.abc) + this.encryptPassword = this.encrypt(this.Key_IV, this.code) // this.password = CryptoJS.AES.encrypt(this.password,this.encPassword).toString(); // console.log("PARTH"+this.password.ciphertext.toString(CryptoJS.enc.Base64)) // this.password = AES.encrypt(this.password).toString(); @@ -244,7 +244,7 @@ export class loginContentClass implements OnInit, OnDestroy { response.previlegeObj !== undefined && response.previlegeObj !== null ) { - this.successCallback(response, this.userID, this.abc); + this.successCallback(response, this.userID, this.code); } }, (error: any) => this.errorCallback(error) @@ -286,7 +286,7 @@ export class loginContentClass implements OnInit, OnDestroy { response.previlegeObj !== undefined && response.previlegeObj !== null ) { - this.successCallback(response, this.userID, this.abc); + this.successCallback(response, this.userID, this.code); } }, (error: any) => this.errorCallback(error) diff --git a/src/app/login/login.html b/src/app/login/login.html index 22bceb9d..b18ea567 100644 --- a/src/app/login/login.html +++ b/src/app/login/login.html @@ -22,7 +22,7 @@
- +