Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
User Account
Commits
86701a67
Commit
86701a67
authored
5 years ago
by
Rosanny Sihombing
Browse files
Options
Download
Email Patches
Plain Diff
handle error pages
parent
517644a5
master
MLAB-677
devel
patch-1
reset-jul13
reset-merge
test_logoutbutton
testing
1 merge request
!2
Mlab 56
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
routes/routes-account.js
+2
-4
routes/routes-account.js
views/DE/404.pug
+1
-1
views/DE/404.pug
views/DE/500.pug
+1
-1
views/DE/500.pug
with
4 additions
and
6 deletions
+4
-6
routes/routes-account.js
+
2
-
4
View file @
86701a67
...
...
@@ -268,22 +268,20 @@ module.exports = function (app, config, passport, i18n) {
// Load hashed passwd from DB
dbconn
.
user
.
query
(
'
SELECT password FROM credential WHERE user_id=
'
+
userId
,
function
(
err
,
rows
,
fields
)
{
if
(
err
)
{
//res.redirect('/500'
)
console
.
error
(
err
)
res
.
status
(
500
).
render
(
lang
+
'
/500
'
,
{
error
:
err
})
throw
err
}
var
userPwd
=
rows
[
0
].
password
// check if the password is correct
bcrypt
.
compare
(
currPwd
,
userPwd
,
function
(
err
,
isMatch
)
{
if
(
err
)
{
//res.redirect('/500'
)
console
.
error
(
err
)
res
.
status
(
500
).
render
(
lang
+
'
/500
'
,
{
error
:
err
})
throw
err
}
else
if
(
!
isMatch
)
{
//req.flash('error', "Sorry, your password was incorrect. Please double-check your password.")
...
...
This diff is collapsed.
Click to expand it.
views/DE/404.pug
+
1
-
1
View file @
86701a67
...
...
@@ -25,6 +25,6 @@ html(lang="de")
img(src="https://transfer.hft-stuttgart.de/images/demo/m4lab_logo.jpg", class="img-responsive center-block", width="185", height="192")
br
br
p 404. The requested URL was not found.
p
(class="h5")
404. The requested URL was not found.
// Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
\ No newline at end of file
This diff is collapsed.
Click to expand it.
views/DE/500.pug
+
1
-
1
View file @
86701a67
...
...
@@ -25,7 +25,7 @@ html(lang="de")
img(src="https://transfer.hft-stuttgart.de/images/demo/m4lab_logo.jpg", class="img-responsive center-block", width="185", height="192")
br
br
p 500. Unexpected Error :(
p
(class="h5")
500. Unexpected Error :(
p #{ error }
// Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets