Commit d3a3cd7a authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

small updates

parent 60011553
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment