From 76310961358debf6a78545202d533835dcdf844f Mon Sep 17 00:00:00 2001 From: goldquest Date: Thu, 6 Dec 2012 02:01:38 +0100 Subject: [PATCH] fix for multiple cookies support (Also fix for, when session is not valid anymore) --- src/node/db/SecurityManager.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/node/db/SecurityManager.js b/src/node/db/SecurityManager.js index 7cbb367d..4289e39c 100644 --- a/src/node/db/SecurityManager.js +++ b/src/node/db/SecurityManager.js @@ -133,10 +133,16 @@ exports.checkAccess = function (padID, sessionCookie, token, password, callback) var now = Math.floor(new Date().getTime()/1000); //is it for this group? - if(sessionInfo.groupID != groupID) return; + if(sessionInfo.groupID != groupID) { + callback(); + return; + } //is validUntil still ok? - if(sessionInfo.validUntil <= now) return; + if(sessionInfo.validUntil <= now){ + callback(); + return; + } // There is a valid session validSession = true;