fix for multiple cookies support (Also fix for, when session is not valid anymore)
This commit is contained in:
parent
4ce16b526e
commit
7631096135
|
@ -133,10 +133,16 @@ exports.checkAccess = function (padID, sessionCookie, token, password, callback)
|
||||||
var now = Math.floor(new Date().getTime()/1000);
|
var now = Math.floor(new Date().getTime()/1000);
|
||||||
|
|
||||||
//is it for this group?
|
//is it for this group?
|
||||||
if(sessionInfo.groupID != groupID) return;
|
if(sessionInfo.groupID != groupID) {
|
||||||
|
callback();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//is validUntil still ok?
|
//is validUntil still ok?
|
||||||
if(sessionInfo.validUntil <= now) return;
|
if(sessionInfo.validUntil <= now){
|
||||||
|
callback();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// There is a valid session
|
// There is a valid session
|
||||||
validSession = true;
|
validSession = true;
|
||||||
|
|
Loading…
Reference in New Issue