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) { ...@@ -41,7 +41,7 @@ export = function (app:any, config:any, passport:any, lang:string) {
// Service Provider private key // Service Provider private key
decryptionPvk: fs.readFileSync(__dirname + '/cert/key.pem', 'utf8'), decryptionPvk: fs.readFileSync(__dirname + '/cert/key.pem', 'utf8'),
// Service Provider Certificate // Service Provider Certificate
privateCert: fs.readFileSync(__dirname + '/cert/key.pem', 'utf8'), privateKey: fs.readFileSync(__dirname + '/cert/key.pem', 'utf8'),
// Identity Provider's public key // Identity Provider's public key
cert: fs.readFileSync(__dirname + '/cert/cert_idp.pem', 'utf8'), cert: fs.readFileSync(__dirname + '/cert/cert_idp.pem', 'utf8'),
...@@ -295,12 +295,12 @@ export = function (app:any, config:any, passport:any, lang:string) { ...@@ -295,12 +295,12 @@ export = function (app:any, config:any, passport:any, lang:string) {
let newPwd = req.body.inputNewPwd let newPwd = req.body.inputNewPwd
let retypePwd = req.body.inputConfirm 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) { if (err) {
console.error(err) console.error(err)
res.status(500).render(lang+'/500', { 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 // check if the password is correct
bcrypt.compare(currPwd, userPwd, function(err, isMatch) { 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