summaryrefslogtreecommitdiff
path: root/src/node/hooks
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2014-11-23 14:14:01 +0000
committerJohn McLear <john@mclear.co.uk>2014-11-23 14:14:01 +0000
commitae7da122d7d35e1da38280f12defd65a899859a1 (patch)
tree9acf59b0a48cddb4372d3d704ac0b446cd564ed1 /src/node/hooks
parent3e8f3cd938995a75e5146a149bf339dd5603416f (diff)
downloadetherpad-lite-ae7da122d7d35e1da38280f12defd65a899859a1.zip
fix session management
Diffstat (limited to 'src/node/hooks')
-rw-r--r--src/node/hooks/express/adminsettings.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/node/hooks/express/adminsettings.js b/src/node/hooks/express/adminsettings.js
index 3529e205..42a07c73 100644
--- a/src/node/hooks/express/adminsettings.js
+++ b/src/node/hooks/express/adminsettings.js
@@ -23,8 +23,7 @@ exports.socketio = function (hook_name, args, cb) {
var io = args.io.of("/settings");
io.on('connection', function (socket) {
- console.warn ("The middleware now handles auth but I'm not convinced SocketIO is being responsible enough here so this needs reviewing before hitting master");
- // if (!socket.handshake.session || !socket.handshake.session.user || !socket.handshake.session.user.is_admin) return;
+ if (!socket.conn.request.session || !socket.conn.request.session.user || !socket.conn.request.session.user.is_admin) return;
socket.on("load", function (query) {
fs.readFile('settings.json', 'utf8', function (err,data) {