From 11095e365447bf29e909b617135c8290ab656135 Mon Sep 17 00:00:00 2001 From: Wolfgang Knopki Date: Mon, 27 Apr 2020 12:37:36 +0200 Subject: [PATCH] routes security adapted --- routes/routes-account.js | 6 +++--- views/DE/account/security.pug | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/routes/routes-account.js b/routes/routes-account.js index adf97214..43394cac 100644 --- a/routes/routes-account.js +++ b/routes/routes-account.js @@ -288,13 +288,13 @@ module.exports = function (app, config, passport, i18n) { //req.flash('error', "Sorry, your password was incorrect. Please double-check your password.") req.flash('error', "Das Passwort ist leider falsch. Bitte überprüfen Sie Ihre Eingabe.") //res.redirect('/security') - res.redirect('/security') + res.redirect('/account/security') } else { if ( newPwd != retypePwd ) { //req.flash('error', "Passwords do no match. Please make sure you re-type your new password correctly.") req.flash('error', 'Passwörter stimmen nicht überein. Bitte stellen Sie sicher, dass Sie das Passwort beide Male genau gleich eingeben.') - res.redirect('/security') + res.redirect('/account/security') } else { // update password @@ -323,7 +323,7 @@ module.exports = function (app, config, passport, i18n) { } }); } - res.redirect('/security') + res.redirect('/account/security') }) }); }); diff --git a/views/DE/account/security.pug b/views/DE/account/security.pug index 29d0b43d..6a6d1ac6 100644 --- a/views/DE/account/security.pug +++ b/views/DE/account/security.pug @@ -50,7 +50,7 @@ html(lang="de") for error, i in errors div.alert.alert-danger.alert-dismissible.fade.show #{ error } a(class="close", href="#", data-dismiss="alert", aria-label="close") × - form(class="needs-validation", method="post", action="/changePwd" novalidate) + form(class="needs-validation", method="post", action="/account/changePwd" novalidate) div(class="form-group row") label(for="currPwd") Aktuelles Passwort input(id="inputCurrPwd", name="inputCurrPwd", type="password", class="form-control" required) -- GitLab