Skip to content

Commit

Permalink
Merge pull request #417 from FAIMS/remove-hard-coded-secret
Browse files Browse the repository at this point in the history
replace hard coded secret with uuid
  • Loading branch information
stevecassidy authored May 20, 2024
2 parents eb56b4b + 00817ca commit 9c0b9be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/buildconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* which server to use and whether to include test data
*/

import {v4 as uuidv4} from 'uuid';
import nodemailer from 'nodemailer';

const TRUTHY_STRINGS = ['true', '1', 'on', 'yes'];
Expand Down Expand Up @@ -183,8 +184,8 @@ function instance_name(): string {
function cookie_secret(): string {
const cookie = process.env.FAIMS_COOKIE_SECRET;
if (cookie === '' || cookie === undefined) {
console.log('FAIMS_COOKIE_SECRET not set, using default');
return 'ahquoo4ohfaGh1oozoinai9ulah8ouge';
console.log('FAIMS_COOKIE_SECRET not set, using generated secret');
return uuidv4();
} else {
return cookie;
}
Expand Down

0 comments on commit 9c0b9be

Please sign in to comment.