Skip to content

Commit e4c419a

Browse files
committed
GDPR9
* Set secure cookies if applicable... probably going to boot everyone off to reset these. Retested local pro... PASS * Output the cookie contents... now we need most of it and easier just to pipe it all out Post OpenUserJS#1416 ... related to OpenUserJS#604
1 parent 05c8739 commit e4c419a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,8 @@ app.use(session({
318318
saveUninitialized: false,
319319
unset: 'destroy',
320320
cookie: {
321-
maxAge: 5 * 60 * 1000 // minutes in ms NOTE: Expanded after successful auth
321+
maxAge: 5 * 60 * 1000, // minutes in ms NOTE: Expanded after successful auth
322+
secure: (isPro && secured ? true : false)
322323
},
323324
rolling: true,
324325
secret: sessionSecret,

controllers/admin.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,8 @@ exports.adminSessionActiveView = function (aReq, aRes, aNext) {
397397
if (data && data.user) {
398398
options.session.push({
399399
_id: aElement._id,
400-
originalMaxAge: data.cookie.originalMaxAge,
401-
expires: data.cookie.expires,
402-
name: data.user.name
400+
name: data.user.name,
401+
cookie: data.cookie
403402
});
404403

405404
options.namedCount++;

0 commit comments

Comments
 (0)