Revert "Fixed foreach loop on session IDs, was breaking EP on single session in cookie."

This reverts commit 443a71bc9c.

	modified:   src/node/db/SecurityManager.js
pull/1015/head
Marcel Klehr 2012-09-19 17:42:36 +02:00
parent 0883043eb9
commit b9da0e187e
1 changed files with 15 additions and 18 deletions

View File

@ -123,8 +123,7 @@ exports.checkAccess = function (padID, sessionCookie, token, password, callback)
}
var sessionIDs = sessionCookie.split(',');
if (sessionIDs){
async.forEach(sessionIDs, function(sessionID, cb){
async.foreach(sessionIDs, function(sessionID) {
sessionManager.getSessionInfo(sessionID, function(err, sessionInfo) {
//skip session if it doesn't exist
if(err && err.message == "sessionID does not exist") return;
@ -142,10 +141,8 @@ exports.checkAccess = function (padID, sessionCookie, token, password, callback)
// There is a valid session
validSession = true;
sessionAuthor = sessionInfo.authorID;
cb(); // finish the current value and go to next
});
}, callback)
}
},
//get author for token
function(callback)