Lieber Nutzer,
' +
+ '
herzlich willkommen beim Transferportal der HFT Stuttgart!
' +
+ 'Sie können nun alle Dienste des Portals nutzen.
' + miscConst.mailSignature
+ mailer.options.to = userEmail
+ mailer.options.subject = emailSubject
+ mailer.options.html = emailContent
+ mailer.transporter.sendMail(mailer.options, function (err: any) {
+ if (err) {
+ console.log('cannot send email')
+ throw err
+ }
+ })
+
+ res.render(lang + '/account/verification', {
+ status: true
+ })
+ }
+ }
+ })
+ }
+ },
+ resetPassword: async function (req: any, res: any) {
+ const newPwd = req.body.inputNewPwd
+
+ const user = await dbController.getUserByToken(req.params.token)
+ if (!user) {
+ res.flash('error', 'User not found.')
+ res.redirect('/login')
+ } else {
+ // encrypt password
+ bcrypt.genSalt(saltRounds, function (err, salt) {
+ bcrypt.hash(newPwd, salt, async function (err: any, hash) {
+ const credentialData = {
+ password: hash,
+ user_id: user.user_id,
+ resetPasswordToken: null,
+ resetPasswordExpires: null
+ }
+ // update password
+ const result = await dbController.updateCredential(credentialData)
+ if (!result) {
+ console.log('Failed to reset password')
+ res.flash('error', 'Datenbankfehler: Passwort kann nicht geändert werden.')
+ } else {
+ res.flash('success', 'Passwort aktualisiert!')
+ // send notification email
+ mailer.options.to = user.email
+ mailer.options.subject = miscConst.updatePasswordMailSubject
+ mailer.options.html = miscConst.updatePasswordMailContent + '
' + miscConst.mailSignature + '
'
+ mailer.transporter.sendMail(mailer.options, function (err: any) {
+ if (err) { console.log(err) }
+ })
+ }
+ res.redirect('/login')
+ })
+ })
+ }
+ },
+ generateNewToken: function (req: any, res: any, config: any) {
+ const emailAddress = req.body.inputEmail
+ async.waterfall([
+ async function (done: any) {
+ const user = await dbController.checkUserEmail(emailAddress)
+ if (!user) {
+ console.log('No user found: ' + String(emailAddress))
+ } else {
+ // generate token
+ let token: string = ''
+ const randomChars: string = 'abcdefghijklmnopqrstuvwxyz0123456789'
+ for (let i = 0; i < 40; i++) {
+ token += randomChars.charAt(Math.floor(Math.random() * randomChars.length))
+ }
+
+ const emailSubject = 'Ihre Passwort-Anfrage an das Transferportal der HFT Stuttgart'
+ const emailContent = '
Lieber Nutzer,
' +
+ '
wir haben Ihre Anfrage zur Erneuerung Ihres Passwortes erhalten. Falls Sie diese Anfrage nicht gesendet haben, ignorieren Sie bitte diese E-Mail.
' +
+ 'Sie können Ihr Passwort mit dem Klick auf diesen Link ändern: ' + String(config.app.host) + '/reset/' + String(token) + '
' +
+ 'Dieser Link ist aus Sicherheitsgründen nur für 1 Stunde gültig.
' + String(miscConst.mailSignature) + '
'
+
+ const credentialData = {
+ user_id: user.id,
+ resetPasswordToken: token,
+ resetPasswordExpires: Date.now() + 3600000 // 1 hour
+ }
+ const result = await dbController.updateCredential(credentialData)
+ if (!result) {
+ console.log('failed to update credential')
+ } else {
+ // send email
+ mailer.options.to = emailAddress
+ mailer.options.subject = emailSubject
+ mailer.options.html = emailContent
+ mailer.transporter.sendMail(mailer.options, function (err: any) {
+ if (err) { console.error(err) }
+ })
+ }
+ }
+ done(null)
+ }
+ ], function (err: any) {
+ if (err) {
+ res.flash('error', 'Ein Fehler ist aufgetreten. Bitte versuchen Sie es erneut.')
+ } else {
+ res.flash('success', 'Wenn Ihre E-Mail-Adresse registriert ist, wurde eine E-Mail mit dem weiteren Vorgehen an ' + String(emailAddress) + ' versendet.')
+ }
+ res.redirect('/account/forgotPwd')
+ })
+ },
checkUserEmail: async function (req: any, res: any) {
const user = await dbController.checkUserEmail(req.params.email)
if (user) { res.send(false) } else {
diff --git a/src/functions/helpers_TBD.ts b/src/functions/helpers_TBD.ts
deleted file mode 100644
index 89506026..00000000
--- a/src/functions/helpers_TBD.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-const helpers = {
- stringToArray: function (input: string) {
- if (input != null) {
- return input.split(',')
- } else {
- return null
- }
- }
-}
-
-export = helpers
diff --git a/src/public/js/security.js b/src/public/js/security.js
index 67213164..5d71fb8a 100644
--- a/src/public/js/security.js
+++ b/src/public/js/security.js
@@ -11,7 +11,7 @@ $('#inputNewPwd, #inputConfirm').on('keyup', function () {
}
// match or not?
- if ($('#inputNewPwd').val() == $('#inputConfirm').val()) {
+ if ($('#inputNewPwd').val() === $('#inputConfirm').val()) {
// $('#message').html('Matching').css('color', 'green');
$('#message').html('Übereinstimmend').css('color', 'green')
isMatch = true
diff --git a/src/routes/account.ts b/src/routes/account.ts
index 78a5699a..e99095ac 100644
--- a/src/routes/account.ts
+++ b/src/routes/account.ts
@@ -2,14 +2,14 @@ import fs from 'fs'
import async from 'async'
import bcrypt from 'bcryptjs'
import * as passportSaml from 'passport-saml'
-import dbconn from '../config/dbconn'
+import { dbConnection } from '../config/dbconn'
import { dbController } from '../controller/dbController'
import { gitlabController } from '../controller/gitlabController'
-import constants from '../config/const'
-import mailer from '../config/mailer'
-import portalUser from '../classes/user'
-import projectInformation from '../classes/website'
-import projectRepo from '../classes/repo'
+import { miscConst } from '../config/const'
+import { mailer } from '../config/mailer'
+import { User } from '../classes/user'
+import { Website } from '../classes/website'
+import { Repo } from '../classes/repo'
const SamlStrategy = passportSaml.Strategy
const saltRounds = 10
@@ -17,7 +17,7 @@ const salt = 64 // salt length
const logoDir = 'public/upload/'
const defaultLogo: any = 'public/default/logo.png'
-export = function (app: any, config: any, passport: any, lang: string) {
+module.exports = function (app: any, config: any, passport: any, lang: string) {
// =========== PASSPORT =======
passport.serializeUser(function (user: any, done: any) {
done(null, user)
@@ -88,7 +88,7 @@ export = function (app: any, config: any, passport: any, lang: string) {
console.log('no user found')
return null
} else {
- const loggedInUser = new portalUser(
+ const loggedInUser = new User(
user.id, email, user.salutation, user.title, user.firstname, user.lastname, user.industry, user.organisation, user.speciality, user.m4lab_idp, user.verificationStatus
)
@@ -180,27 +180,23 @@ export = function (app: any, config: any, passport: any, lang: string) {
if (loggedInUser.getGitlabUserId()) { // for users who have activated their gitlab account
const userProjects = await gitlabController.getUserProjects(loggedInUser.getGitlabUserId()!)
- if (!userProjects) {
- console.error('something went wrong')
- res.status(500).render(lang + '/500', { error: 'something went wrong' })
- }
-
- let project: any
- for (project in userProjects) {
- if (userProjects[project].tag_list.includes('website')) {
- const page = {
- projectInformation: new projectInformation(loggedInUser.getGitlabUserId()!, userProjects[project].name, userProjects[project].description,
- userProjects[project].id, userProjects[project].avatar_url, userProjects[project].path_with_namespace),
- pipelineStatus: await gitlabController.getProjectPipelineLatestStatus(userProjects[project].id)
+ if (userProjects) {
+ let project: any
+ for (project in userProjects) {
+ if (userProjects[project].tag_list.includes('website')) {
+ const page = {
+ projectInformation: new Website(loggedInUser.getGitlabUserId()!, userProjects[project].name, userProjects[project].description,
+ userProjects[project].id, userProjects[project].avatar_url, userProjects[project].path_with_namespace),
+ pipelineStatus: await gitlabController.getProjectPipelineLatestStatus(userProjects[project].id)
+ }
+ gitlabPagesArr.push(page)
+ } else {
+ const repo = new Repo(loggedInUser.getGitlabUserId()!, userProjects[project].name, userProjects[project].description,
+ userProjects[project].id, userProjects[project].avatar_url, userProjects[project].path_with_namespace)
+ gitlabReposArr.push(repo)
}
- gitlabPagesArr.push(page)
- } else {
- const repo = new projectRepo(loggedInUser.getGitlabUserId()!, userProjects[project].name, userProjects[project].description,
- userProjects[project].id, userProjects[project].avatar_url, userProjects[project].path_with_namespace)
- gitlabReposArr.push(repo)
}
}
-
res.render(lang + '/account/services', {
user: loggedInUser,
gitlabRepos: gitlabReposArr,
@@ -297,7 +293,7 @@ export = function (app: any, config: any, passport: any, lang: string) {
const newPwd = req.body.inputNewPwd
const retypePwd = req.body.inputConfirm
- dbconn.user.query('SELECT password FROM credential WHERE user_id=' + loggedInUser.getId(), function (err: any, rows: any) {
+ dbConnection.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 })
@@ -313,7 +309,7 @@ export = function (app: any, config: any, passport: any, lang: string) {
res.flash('error', 'Das Passwort ist leider falsch. Bitte überprüfen Sie Ihre Eingabe.')
res.redirect('/account/security')
} else {
- if (newPwd != retypePwd) {
+ if (newPwd !== retypePwd) {
res.flash('error', 'Passwörter stimmen nicht überein. Bitte stellen Sie sicher, dass Sie das Passwort beide Male genau gleich eingeben.')
res.redirect('/account/security')
} else {
@@ -333,8 +329,8 @@ export = function (app: any, config: any, passport: any, lang: string) {
res.flash('success', 'Passwort aktualisiert!')
// send notifiaction email
mailer.options.to = loggedInUser.getEmail()
- mailer.options.subject = constants.updatePasswordMailSubject
- mailer.options.html = constants.updatePasswordMailContent + '
' + constants.mailSignature + '
'
+ mailer.options.subject = miscConst.updatePasswordMailSubject
+ mailer.options.html = miscConst.updatePasswordMailContent + '
' + miscConst.mailSignature + '
'
mailer.transporter.sendMail(mailer.options, function (err: any) {
if (err) { console.log(err) }
})
@@ -368,7 +364,7 @@ export = function (app: any, config: any, passport: any, lang: string) {
'
vielen Dank für Ihre Anmeldung am Transferportal der HFT Stuttgart.
' +
'Um Ihre Anmeldung zu bestätigen, klicken Sie bitte diesen Link: ' + config.app.host + '/verifyAccount?token=' + token +
'
' +
- 'Ohne Bestätigung Ihres Kontos müssen wir Ihr Konto leider nach 7 Tagen löschen.
' + constants.mailSignature +
+ 'Ohne Bestätigung Ihres Kontos müssen wir Ihr Konto leider nach 7 Tagen löschen.
' + miscConst.mailSignature +
'
'
mailer.options.to = loggedInUser.email
mailer.options.subject = emailSubject
@@ -422,7 +418,7 @@ export = function (app: any, config: any, passport: any, lang: string) {
const projectName = req.body.name.toLowerCase().replace(/\s/g, '-')
const projectDesc = req.body.description
const projectTemplate = req.body.template
- const newInformation = new projectInformation(loggedInUser.getGitlabUserId()!, projectName, projectDesc)
+ const newInformation = new Website(loggedInUser.getGitlabUserId()!, projectName, projectDesc)
let newLogoFile = defaultLogo
if (req.files) { newLogoFile = req.files.logo }
@@ -441,7 +437,7 @@ export = function (app: any, config: any, passport: any, lang: string) {
async function (newLogoFile: any) { // create a new GitLab Page
const newPages = await gitlabController.createNewPages(newInformation, newLogoFile, projectTemplate)
if (newPages.status) {
- if (newPages.data.message.name == 'has already been taken') {
+ if (newPages.data.message.name === 'has already been taken') {
res.flash('error', "Der Projektname '" + newInformation.getName() + "' ist bereits vergeben, bitte wählen Sie einen anderen Namen.")
} else {
res.flash('error', 'Ein Fehler ist aufgetreten. Bitte versuchen Sie es erneut. ')
@@ -486,11 +482,11 @@ export = function (app: any, config: any, passport: any, lang: string) {
} else if (!project.owner) {
console.log(' ========= Project cannot be accessed, since it does not have an owner')
res.redirect('/account/services')
- } else if (project.owner.id != loggedInUser.getGitlabUserId()) {
+ } else if (project.owner.id !== loggedInUser.getGitlabUserId()) {
console.log(' ========= Access denied: Not your project')
res.redirect('/account/services')
} else {
- const curInformation = new projectInformation(loggedInUser.getGitlabUserId()!, project.name, project.description,
+ const curInformation = new Website(loggedInUser.getGitlabUserId()!, project.name, project.description,
req.query.id, project.avatar_url, project.path_with_namespace)
res.render(lang + '/account/updateInformation', {
@@ -518,7 +514,7 @@ export = function (app: any, config: any, passport: any, lang: string) {
} else {
const projectName = req.body.name.toLowerCase().replace(/\s/g, '-')
const projectDesc = req.body.description
- const updatedInformation = new projectInformation(loggedInUser.getGitlabUserId()!, projectName, projectDesc, req.query.id)
+ const updatedInformation = new Website(loggedInUser.getGitlabUserId()!, projectName, projectDesc, req.query.id)
let newLogoFile: any
async.waterfall([
@@ -548,7 +544,7 @@ export = function (app: any, config: any, passport: any, lang: string) {
res.flash('success', 'Ihre Website wurde aktualisiert')
}
- res.redirect('/account/updateInformation?id=' + updatedInformation.getId())
+ res.redirect('/account/updateInformation?id=' + String(updatedInformation.getId()))
}
], function (err) {
if (err != null) console.log(err)
@@ -580,7 +576,7 @@ export = function (app: any, config: any, passport: any, lang: string) {
console.log(' ========= Error or no project found')
} else if (!project.owner) {
console.log(' ========= Project cannot be accessed, since it does not have an owner')
- } else if (project.owner.id != loggedInUser.getGitlabUserId()) {
+ } else if (project.owner.id !== loggedInUser.getGitlabUserId()) {
console.log(' ========= Access denied: Not your project')
} else {
const isDeleted = await gitlabController.deleteProjectById(projectId)
diff --git a/src/routes/public.ts b/src/routes/public.ts
index 15154067..14e5e1bb 100644
--- a/src/routes/public.ts
+++ b/src/routes/public.ts
@@ -1,95 +1,12 @@
-import async from 'async'
-import bcrypt from 'bcryptjs'
-import { dbController } from '../controller/dbController'
-import mailer from '../config/mailer'
-import constants from '../config/const'
import { publicController } from '../controller/publicController'
-const saltRounds: number = 10
-const salt: number = 64
-
-export = function (app: any, config: any, lang: string) {
+module.exports = function (app: any, config: any, lang: any) {
// ================== NEW USERS REGISTRATION ======================
app.get('/registration', function (req: any, res: any) {
- publicController.showRegistrationPage(res)
+ publicController.showRegistrationPage(res, lang)
})
app.post('/registration', function (req: any, res: any) {
- // user data
- const curDate: Date = new Date()
- const userData: any = {
- salutation: req.body.inputSalutation,
- title: req.body.inputTitle,
- firstname: req.body.inputFirstname,
- lastname: req.body.inputLastname,
- email: req.body.inputEmail,
- organisation: req.body.inputOrganisation,
- industry: req.body.inputIndustry,
- speciality: req.body.inputSpeciality,
- createdDate: curDate.toISOString().slice(0, 10)
- }
-
- const userEmail: any = userData.email
- const pos: number = userEmail.indexOf('@')
- const emailLength: number = userEmail.length
- const emailDomain: any = userEmail.slice(pos, emailLength)
-
- if (emailDomain.toLowerCase() == '@hft-stuttgart.de') {
- res.flash('error', 'Fehlgeschlagen: HFT-Account')
- res.redirect('/account/registration')
- } else {
- async.waterfall([
- function (done: any) {
- // generate token
- let token: string = ''
- const randomChars: string = 'abcdefghijklmnopqrstuvwxyz0123456789'
- for (let i = 0; i < 40; i++) {
- token += randomChars.charAt(Math.floor(Math.random() * randomChars.length))
- }
- // encrypt password
- bcrypt.genSalt(saltRounds, function (err, salt) {
- bcrypt.hash(req.body.inputPassword, salt, function (err: any, hash: any) {
- const newAccount: any = {
- profile: userData,
- password: hash,
- verificationToken: token
- }
- done(err, newAccount)
- })
- })
- },
- // save data
- function (newAccount: any, err: any) {
- dbController.registerNewUser(newAccount, function (err: any) {
- if (err) {
- res.flash('error', 'Fehlgeschlagen')
- } else {
- // send email
- const emailSubject = 'Bitte bestätigen Sie Ihr M4_LAB Benutzerkonto'
- const emailContent = 'Lieber Nutzer,
' +
- '
herzlich willkommen beim Transferportal der HFT Stuttgart!
' +
- 'Sie können nun alle Dienste des Portals nutzen.
' + constants.mailSignature
- mailer.options.to = userEmail
- mailer.options.subject = emailSubject
- mailer.options.html = emailContent
- mailer.transporter.sendMail(mailer.options, function (err: any) {
- if (err) {
- console.log('cannot send email')
- throw err
- }
- })
-
- res.render(lang + '/account/verification', {
- status: true
- })
- }
- }
- })
- }
+ publicController.verifyAccount(req, res, lang)
})
// ==================== FORGOT PASSWORD ===========================
app.get('/forgotPwd', function (req: any, res: any) {
- publicController.showForgotPwdPage(req, res)
+ publicController.showForgotPwdPage(req, res, lang)
})
app.post('/forgotPwd', function (req: any, res: any) {
- const emailAddress = req.body.inputEmail
- async.waterfall([
- async function (done: any) {
- const user = await dbController.checkUserEmail(emailAddress)
- if (!user) {
- console.log('No user found: ' + String(emailAddress))
- } else {
- // generate token
- let token: string = ''
- const randomChars: string = 'abcdefghijklmnopqrstuvwxyz0123456789'
- for (let i = 0; i < 40; i++) {
- token += randomChars.charAt(Math.floor(Math.random() * randomChars.length))
- }
-
- const emailSubject = 'Ihre Passwort-Anfrage an das Transferportal der HFT Stuttgart'
- const emailContent = '
Lieber Nutzer,
' +
- '
wir haben Ihre Anfrage zur Erneuerung Ihres Passwortes erhalten. Falls Sie diese Anfrage nicht gesendet haben, ignorieren Sie bitte diese E-Mail.
' +
- 'Sie können Ihr Passwort mit dem Klick auf diesen Link ändern: ' + String(config.app.host) + '/reset/' + String(token) + '
' +
- 'Dieser Link ist aus Sicherheitsgründen nur für 1 Stunde gültig.
' + String(constants.mailSignature) + '
'
-
- const credentialData = {
- user_id: user.id,
- resetPasswordToken: token,
- resetPasswordExpires: Date.now() + 3600000 // 1 hour
- }
- const result = await dbController.updateCredential(credentialData)
- if (!result) {
- console.log('failed to update credential')
- } else {
- // send email
- mailer.options.to = emailAddress
- mailer.options.subject = emailSubject
- mailer.options.html = emailContent
- mailer.transporter.sendMail(mailer.options, function (err: any) {
- if (err) { console.error(err) }
- })
- }
- }
- done(null)
- }
- ], function (err: any) {
- if (err) {
- res.flash('error', 'Ein Fehler ist aufgetreten. Bitte versuchen Sie es erneut.')
- } else {
- res.flash('success', 'Wenn Ihre E-Mail-Adresse registriert ist, wurde eine E-Mail mit dem weiteren Vorgehen an ' + String(emailAddress) + ' versendet.')
- }
- res.redirect('/account/forgotPwd')
- })
+ publicController.generateNewToken(req, res, config)
})
// reset
app.get('/reset/:token', async function (req: any, res: any) {
- publicController.showResetToken(req, res)
+ publicController.showResetPassword(req, res, lang)
})
app.post('/reset/:token', async function (req: any, res: any) {
- const newPwd = req.body.inputNewPwd
-
- const user = await dbController.getUserByToken(req.params.token)
- if (!user) {
- res.flash('error', 'User not found.')
- res.redirect('/login')
- } else {
- // encrypt password
- bcrypt.genSalt(saltRounds, function (err, salt) {
- bcrypt.hash(newPwd, salt, async function (err: any, hash) {
- const credentialData = {
- password: hash,
- user_id: user.user_id,
- resetPasswordToken: null,
- resetPasswordExpires: null
- }
- // update password
- const result = await dbController.updateCredential(credentialData)
- if (!result) {
- console.log('Failed to reset password')
- res.flash('error', 'Datenbankfehler: Passwort kann nicht geändert werden.')
- } else {
- res.flash('success', 'Passwort aktualisiert!')
- // send notification email
- mailer.options.to = user.email
- mailer.options.subject = constants.updatePasswordMailSubject
- mailer.options.html = constants.updatePasswordMailContent + '
' + constants.mailSignature + '
'
- mailer.transporter.sendMail(mailer.options, function (err: any) {
- if (err) { console.log(err) }
- })
- }
- res.redirect('/login')
- })
- })
- }
+ publicController.resetPassword(req, res)
})
// ======================= CONTACT FORM ===========================
app.get('/contact', function (req: any, res: any) {
- publicController.showContactPage(req, res)
+ publicController.showContactPage(req, res, lang)
})
app.post('/contact', function (req: any, res: any) {
publicController.sendContactMessage(req, res)
diff --git a/src/views/DE/account/services.pug b/src/views/DE/account/services.pug
index 46c91bc2..f03fd1f7 100644
--- a/src/views/DE/account/services.pug
+++ b/src/views/DE/account/services.pug
@@ -78,6 +78,9 @@ html(lang="de")
div(class="col text-right")
button(type="button", class="btn btn-sm btn-success" disabled) Neuer Projektdatensatz
table(class="table")
+ if gitlabRepos.length == 0
+ tr
+ td Currently you have no project codes/data
for item in gitlabRepos
- let img = item.logo
tr
--
GitLab
From 40c493afaa3f59310c372a0517e5b5de7f0cc7cb Mon Sep 17 00:00:00 2001
From: Rosanny
Date: Wed, 6 Jul 2022 13:19:47 +0200
Subject: [PATCH 24/28] update ci config
---
.gitlab-ci.yml | 6 ------
1 file changed, 6 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d11d9bcd..f41cc305 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,12 +4,6 @@ deploy-testing:
- npm install
- npm run clean
- npm run build
- - rm -rf ./built/public/default
- - rm -rf ./built/routes/cert
- - rm -rf ./built/views
- - cp -R ./public/default ./built/public
- - cp -R ./routes/cert ./built/routes
- - cp -R ./views ./built
- cat $configfiledev > ./built/config/config.js
- cat $cert > ./built/routes/cert/cert.pem
- cat $certidp > ./built/routes/cert/cert_idp.pem
--
GitLab
From b55c912de9f53f2c145fbafd4d93577235ebb9cf Mon Sep 17 00:00:00 2001
From: Rosanny
Date: Wed, 6 Jul 2022 13:33:53 +0200
Subject: [PATCH 25/28] add data
---
src/routes/cert/cert.pem | 33 +++++++++++++++++++++++++++++++++
src/routes/cert/cert_idp.pem | 1 +
src/routes/cert/key.pem | 3 +++
3 files changed, 37 insertions(+)
create mode 100644 src/routes/cert/cert.pem
create mode 100644 src/routes/cert/cert_idp.pem
create mode 100644 src/routes/cert/key.pem
diff --git a/src/routes/cert/cert.pem b/src/routes/cert/cert.pem
new file mode 100644
index 00000000..0a11f4a1
--- /dev/null
+++ b/src/routes/cert/cert.pem
@@ -0,0 +1,33 @@
+-----BEGIN CERTIFICATE-----
+MIIFpDCCA4ygAwIBAgIJAKOpWVnPZyUUMA0GCSqGSIb3DQEBCwUAMGcxCzAJBgNV
+BAYTAkRFMRIwEAYDVQQIDAlTdHV0dGdhcnQxEjAQBgNVBAcMCVN0dXR0Z2FydDEM
+MAoGA1UECgwDSEZUMQ4wDAYDVQQLDAVNNExBQjESMBAGA1UEAwwJU2lob21iaW5n
+MB4XDTE5MTEwODE0MzI0M1oXDTIyMDQyNjE0MzI0M1owZzELMAkGA1UEBhMCREUx
+EjAQBgNVBAgMCVN0dXR0Z2FydDESMBAGA1UEBwwJU3R1dHRnYXJ0MQwwCgYDVQQK
+DANIRlQxDjAMBgNVBAsMBU00TEFCMRIwEAYDVQQDDAlTaWhvbWJpbmcwggIiMA0G
+CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDmPKgA2gn8KOBe73p3Tsdve90n2itC
+wno8qs3XyTatdk84PZWOJz7iyWElLOgKUThvbQ7Z6yDKSFxmuwX+cMqqdmaJY6Dz
+vKOPOQT0adGWUlRRP0QucTYKvV8euqr+vKBWo6HN73RYXgwSVapOfNCh71s09cmh
+2jkGPvPgQ0ZhoO85fdn4xf328bP0b4pG5oCJu/oOWxesCXlyHcOGx0jrR8H7Nsee
+36vOrOg3CJWM+LNWhemKOC0WBj+3zEyVxiHZgy/3XAIBY2vohnU8osaOdVqT9sBr
+DrW4zkwAbGQiiDoUVfZw0ERS3YkBPbTtY3dkRviEabRn7WGCCsGRXNRIAm9pRl7W
+osddMIu4tmkmNeJvfBFv3fM/aVS6UYuSmUAdd5g5M82U9BFz5IRXZITODbgLO6jM
+dZ5XM3sffadrneC0r/IKnX57XvC6jUvSuAtum6Zct2sr5tEJRrrkZ52ZVLydBQtW
+kvcqD/C+t4sJpLXn+2Dt+FRc5NTy/zu5kNJ4FKBx+aBMdWVk336y40yjlAFcWu82
+dKL0RzTlPGdp7IGsrCRsPozVrawtM/5OPcAMow/Tg8q9Z67wbpeB3OGiG1PmpjNq
+iG/+l/CrU8PSBF+RaSRNg+VfPTw+0lAatV0RstHJzXN4a+fQVGt54rN+mkNE7LrV
+TTgWPqAk9AcPuQIDAQABo1MwUTAdBgNVHQ4EFgQUQXEm5SdEh/kQ5cjAhQxgVkL/
+GQowHwYDVR0jBBgwFoAUQXEm5SdEh/kQ5cjAhQxgVkL/GQowDwYDVR0TAQH/BAUw
+AwEB/zANBgkqhkiG9w0BAQsFAAOCAgEA1yuHFmrzoVMLC0f+puPT7ob9Efhyk17G
+mYHu5IWGzovDjkFv2w0ZzI86XhIBjpyVHgivVQjCFmnnb6FdFHCVJD3eNKHJTRD+
+TBi42mU9AOm+lcK39jL4+Nhnr5rmob+UsOgqhUxx76Y0BSIUm7ax3ezHp7mmbr68
+hxQcPv1YEmrSE0NQvXl1ck5CeK/p8KOsGKGaOnnfvMp7QICTLeCiRnBSCTk0pWgY
+KP3DSAsp4OtuaHXh7xnNKOMrK2mvZJux3U2z6BC2JGWZGnBGjmwHr7xA7P2gg642
+IsSvcYBR9QHoQHJZT8x2904igVIxHUjz4H3oAgL4e8ksTANKkudmtAD/YDW1rLTY
+mpWUyMf5UwVXzd8/VoAkzX7gNh7oTXPmo0gQ1XyWQRKokoUGdkz38bb3J8yOlpwN
+1XojKDyucM/CWB3zUmoXgjQwKlf+oF5AyYv5ElIHoZK3S6WciKjYjJqfZA7RqPml
+LVBbDZNcDZm/e5qtYz7r4TOW75GNJLzXnafGwqeNmbHprgYdvjlNLmtAeojuKr8n
+Pi3Lu89e/8IKbX6+GkuYcv6XjnQc+keTBb4Lo17+HXduixgMyEy+ErIOUx6UMiLs
+8UgrEsOaxhrzEufC5B6tqYGQzMXTBuSW/Mzv6BddX4W3+pnOa9m7B3+JMFlh0lgC
+GobuGUHz6X4=
+-----END CERTIFICATE-----
diff --git a/src/routes/cert/cert_idp.pem b/src/routes/cert/cert_idp.pem
new file mode 100644
index 00000000..a113711b
--- /dev/null
+++ b/src/routes/cert/cert_idp.pem
@@ -0,0 +1 @@
+key-goes-here
\ No newline at end of file
diff --git a/src/routes/cert/key.pem b/src/routes/cert/key.pem
new file mode 100644
index 00000000..735408af
--- /dev/null
+++ b/src/routes/cert/key.pem
@@ -0,0 +1,3 @@
+-----BEGIN PRIVATE KEY-----
+key-goes-here
+-----END PRIVATE KEY-----
--
GitLab
From d21cca4fc863478c14cdf5792fd7adcdf878f21f Mon Sep 17 00:00:00 2001
From: Rosanny
Date: Wed, 6 Jul 2022 14:32:27 +0200
Subject: [PATCH 26/28] minor fix
---
src/config/dbconn.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/config/dbconn.ts b/src/config/dbconn.ts
index 2b0caa6d..2e5bc447 100644
--- a/src/config/dbconn.ts
+++ b/src/config/dbconn.ts
@@ -1,6 +1,6 @@
import mysql from 'mysql2'
-const env = process.env.NODE_ENV ?? 'development'
+const env = process.env.NODE_ENV ?? 'testing'
const config = require('./config')[env]
// ==== USER ACOOUNT DB CONNECTION ====
--
GitLab
From 9c958eeea9f79cb2e2d4443d765c4bcc49af1641 Mon Sep 17 00:00:00 2001
From: Rosanny
Date: Wed, 6 Jul 2022 14:39:30 +0200
Subject: [PATCH 27/28] cosmetic
---
src/views/DE/account/profile.pug | 4 ++--
src/views/DE/account/security.pug | 6 +++---
src/views/DE/account/services.pug | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/views/DE/account/profile.pug b/src/views/DE/account/profile.pug
index adf827bd..ed871abd 100644
--- a/src/views/DE/account/profile.pug
+++ b/src/views/DE/account/profile.pug
@@ -19,7 +19,7 @@ html(lang="de")
a(class="nav-link pl-0 text-nowrap" href="/account/")
span(class="font-weight-bold color_black") #{user.firstName} #{user.lastName}
li(class="nav-item")
- a(class="nav-link pl-0" href="/account/profile")
+ a(class="nav-link pl-0" href="/account/profile/#")
i(class="fa fa-user fa-fw color_black")
span(class="d-none d-md-inline color_black") Benutzerprofil
if user.is_m4lab_idp
@@ -28,7 +28,7 @@ html(lang="de")
i(class="fa fa-lock fa-fw")
span(class="d-none d-md-inline") Sicherheitseinstellungen
li(class="nav-item")
- a(class="nav-link pl-0" href="/services")
+ a(class="nav-link pl-0" href="/account/services")
i(class="fa fa-tasks fa-fw")
span(class="d-none d-md-inline") Projekte und Dienste
li(class="nav-item")
diff --git a/src/views/DE/account/security.pug b/src/views/DE/account/security.pug
index a21685c1..c0cc565b 100644
--- a/src/views/DE/account/security.pug
+++ b/src/views/DE/account/security.pug
@@ -23,15 +23,15 @@ html(lang="de")
a(class="nav-link pl-0 text-nowrap" href="/account/")
span(class="font-weight-bold color_black") #{user.firstName} #{user.lastName}
li(class="nav-item")
- a(class="nav-link pl-0" href="/profile")
+ a(class="nav-link pl-0" href="/account/profile")
i(class="fa fa-user fa-fw")
span(class="d-none d-md-inline") Benutzerprofil
li(class="nav-item")
- a(class="nav-link pl-0" href="/account/security")
+ a(class="nav-link pl-0" href="/account/security/#")
i(class="fa fa-lock fa-fw color_black")
span(class="d-none d-md-inline color_black") Sicherheitseinstellungen
li(class="nav-item")
- a(class="nav-link pl-0" href="/services")
+ a(class="nav-link pl-0" href="/account/services")
i(class="fa fa-tasks fa-fw")
span(class="d-none d-md-inline") Projekte und Dienste
li(class="nav-item")
diff --git a/src/views/DE/account/services.pug b/src/views/DE/account/services.pug
index f03fd1f7..358f2767 100644
--- a/src/views/DE/account/services.pug
+++ b/src/views/DE/account/services.pug
@@ -19,7 +19,7 @@ html(lang="de")
a(class="nav-link pl-0 text-nowrap" href="/")
span(class="font-weight-bold color_black") #{user.firstName} #{user.lastName}
li(class="nav-item")
- a(class="nav-link pl-0" href="/profile")
+ a(class="nav-link pl-0" href="/account/profile")
i(class="fa fa-user fa-fw")
span(class="d-none d-md-inline") Benutzerprofil
if user.is_m4lab_idp
@@ -28,7 +28,7 @@ html(lang="de")
i(class="fa fa-lock fa-fw")
span(class="d-none d-md-inline") Sicherheitseinstellungen
li(class="nav-item")
- a(class="nav-link pl-0" href="/account/services")
+ a(class="nav-link pl-0" href="/account/services/#")
i(class="fa fa-tasks fa-fw color_black")
span(class="d-none d-md-inline color_black") Projekte und Dienste
li(class="nav-item")
--
GitLab
From 898eab3b52de7c63558a1ca9dc0f486c6da5d239 Mon Sep 17 00:00:00 2001
From: Rosanny
Date: Wed, 6 Jul 2022 14:49:01 +0200
Subject: [PATCH 28/28] cosmetic
---
src/views/DE/account/profile.pug | 2 +-
src/views/DE/account/security.pug | 2 +-
src/views/DE/account/services.pug | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/views/DE/account/profile.pug b/src/views/DE/account/profile.pug
index ed871abd..42ee4f9f 100644
--- a/src/views/DE/account/profile.pug
+++ b/src/views/DE/account/profile.pug
@@ -19,7 +19,7 @@ html(lang="de")
a(class="nav-link pl-0 text-nowrap" href="/account/")
span(class="font-weight-bold color_black") #{user.firstName} #{user.lastName}
li(class="nav-item")
- a(class="nav-link pl-0" href="/account/profile/#")
+ a(class="nav-link pl-0" href="#")
i(class="fa fa-user fa-fw color_black")
span(class="d-none d-md-inline color_black") Benutzerprofil
if user.is_m4lab_idp
diff --git a/src/views/DE/account/security.pug b/src/views/DE/account/security.pug
index c0cc565b..0ebfc3b2 100644
--- a/src/views/DE/account/security.pug
+++ b/src/views/DE/account/security.pug
@@ -27,7 +27,7 @@ html(lang="de")
i(class="fa fa-user fa-fw")
span(class="d-none d-md-inline") Benutzerprofil
li(class="nav-item")
- a(class="nav-link pl-0" href="/account/security/#")
+ a(class="nav-link pl-0" href="#")
i(class="fa fa-lock fa-fw color_black")
span(class="d-none d-md-inline color_black") Sicherheitseinstellungen
li(class="nav-item")
diff --git a/src/views/DE/account/services.pug b/src/views/DE/account/services.pug
index 358f2767..5d0df5d8 100644
--- a/src/views/DE/account/services.pug
+++ b/src/views/DE/account/services.pug
@@ -28,7 +28,7 @@ html(lang="de")
i(class="fa fa-lock fa-fw")
span(class="d-none d-md-inline") Sicherheitseinstellungen
li(class="nav-item")
- a(class="nav-link pl-0" href="/account/services/#")
+ a(class="nav-link pl-0" href="#")
i(class="fa fa-tasks fa-fw color_black")
span(class="d-none d-md-inline color_black") Projekte und Dienste
li(class="nav-item")
--
GitLab