From 6c102e4c9d230785ca6b3ade7dedabd8125c0526 Mon Sep 17 00:00:00 2001 From: chris-held Date: Thu, 16 Jan 2014 15:13:01 -0600 Subject: [PATCH] use session secret to prevent duplication --- lib/middleware.js | 2 +- lib/socket.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/middleware.js b/lib/middleware.js index ae6a95e..a9ed943 100755 --- a/lib/middleware.js +++ b/lib/middleware.js @@ -79,7 +79,7 @@ exports.getMiddleware = function(options, cb) { var restRouter = RESTful(options, files.restFiles || []); var middleware = [ - Connect.cookieParser(options.connect.cookieParser.secret), + Connect.cookieParser(options.connect.session.secret), Connect.session(options.connect.session), // bodyParser handling diff --git a/lib/socket.js b/lib/socket.js index af9f75e..af848e5 100755 --- a/lib/socket.js +++ b/lib/socket.js @@ -169,7 +169,7 @@ var init = socket.init = function(options, cb, mirror) { } var cookies = cookie.parse(handshakeData.headers.cookie); - cookies = Connect.utils.parseSignedCookies(cookies, options.connect.cookieParser.secret), + cookies = Connect.utils.parseSignedCookies(cookies, options.connect.session.secret), sessionIdCookie = cookies[options.connect.session.key]; console.log("Socket handshake session id is " + sessionIdCookie); handshakeData.sessionId = sessionIdCookie;