Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
User Account
Commits
d3a3cd7a
Commit
d3a3cd7a
authored
Aug 17, 2021
by
Rosanny Sihombing
Browse files
small updates
parent
60011553
Changes
1
Hide whitespace changes
Inline
Side-by-side
routes/account.ts
View file @
d3a3cd7a
...
...
@@ -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
private
Cert
:
fs
.
readFileSync
(
__dirname
+
'
/cert/key.pem
'
,
'
utf8
'
),
private
Key
:
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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment