diff --git a/README.md b/README.md index b67f888..7af699a 100644 --- a/README.md +++ b/README.md @@ -89,3 +89,11 @@ The athena websockets interface is not implemented yet, so the comma app and ath ![image](https://user-images.githubusercontent.com/48515354/118385075-2a459c80-b60c-11eb-976c-bc331a609391.png) ![image](https://user-images.githubusercontent.com/48515354/118385084-37fb2200-b60c-11eb-8d3e-6db458827808.png) + + +## UAT + +Launch with: +``` +docker-compose -f docker-compose.yml -f docker-compose.uat.yml up -d +``` \ No newline at end of file diff --git a/routes/useradmin.js b/routes/useradmin.js index 6a8fd7d..3d835a3 100644 --- a/routes/useradmin.js +++ b/routes/useradmin.js @@ -104,14 +104,14 @@ router.post('/useradmin/register/token', bodyParser.urlencoded({ extended: true return res.redirect(`/useradmin/register?status=${encodeURIComponent('Email is already registered')}`); } - const token = crypto.createHmac('sha256', process.env.APP_SALT).update(email.trim()).digest('hex'); + const token = (process.env.NODE_ENV === 'development') ? 'verysecrettoken' : crypto.createHmac('sha256', process.env.APP_SALT).update(email.trim()).digest('hex'); let infoText = ''; if (req.body.token === undefined) { // email entered, token request infoText = 'Please check your inbox (SPAM) for an email with the registration token.
If the token was not delivered, please ask the administrator to check the server.log for the token generated for your email.

'; - const emailStatus = await mailingController.sendEmailVerification(token, email); + await mailingController.sendEmailVerification(token, email); } else if (req.body.token !== token) { infoText = 'The registration token you entered was incorrect, please try again.

'; } else if (req.body.password !== req.body.password2 || req.body.password.length < 3) {