From d3a3cd7a2b64371fc09ebb666617687fc9317aee Mon Sep 17 00:00:00 2001 From: Rosanny <rosanny.sihombing@hft-stuttgart.de> Date: Tue, 17 Aug 2021 15:10:25 +0200 Subject: [PATCH] small updates --- routes/account.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/account.ts b/routes/account.ts index da1b2fb9..68c3ca61 100644 --- a/routes/account.ts +++ b/routes/account.ts @@ -41,7 +41,7 @@ export = function (app:any, config:any, passport:any, lang:string) { // Service Provider private key decryptionPvk: fs.readFileSync(__dirname + '/cert/key.pem', 'utf8'), // Service Provider Certificate - privateCert: fs.readFileSync(__dirname + '/cert/key.pem', 'utf8'), + privateKey: fs.readFileSync(__dirname + '/cert/key.pem', 'utf8'), // Identity Provider's public key cert: fs.readFileSync(__dirname + '/cert/cert_idp.pem', 'utf8'), @@ -295,12 +295,12 @@ export = function (app:any, config:any, passport:any, lang:string) { let newPwd = req.body.inputNewPwd let retypePwd = req.body.inputConfirm - dbconn.user.query('SELECT password FROM credential WHERE user_id='+loggedInUser.getId(), function (err, rows, fields) { + dbconn.user.query('SELECT password FROM credential WHERE user_id='+loggedInUser.getId(), function (err:any, rows:any) { if (err) { console.error(err) res.status(500).render(lang+'/500', { error: err }) } - var userPwd = rows[0].password + let userPwd = rows[0].password // check if the password is correct bcrypt.compare(currPwd, userPwd, function(err, isMatch) { -- GitLab