Skip to content

Check if cookies[sessionKey] exists#96

Merged
mthenw merged 1 commit intomthenw:masterfrom
yagop:patch-1
Jul 3, 2017
Merged

Check if cookies[sessionKey] exists#96
mthenw merged 1 commit intomthenw:masterfrom
yagop:patch-1

Conversation

@yagop
Copy link
Copy Markdown
Contributor

@yagop yagop commented Jun 29, 2017

It happens that if session cookie is not provided, server fails. This happens if you restart the server with authentication enabled after being disabled.

@yagop
Copy link
Copy Markdown
Contributor Author

yagop commented Jun 29, 2017

This is the error :

./bin/frontail /tmp/debug.log -U a -P b
/tmp/frontail/node_modules/connect/lib/utils.js:199
  return 0 == str.indexOf('s:')
                 ^

TypeError: Cannot read property 'indexOf' of undefined
    at Object.exports.parseSignedCookie (/tmp/frontail/node_modules/connect/lib/utils.js:199:18)
    at Array.io.use (/tmp/frontail/index.js:73:41)
    at run (/tmp/frontail/node_modules/socket.io/lib/namespace.js:116:11)
    at Namespace.run (/tmp/frontail/node_modules/socket.io/lib/namespace.js:128:3)
    at Namespace.add (/tmp/frontail/node_modules/socket.io/lib/namespace.js:157:8)
    at Client.connect (/tmp/frontail/node_modules/socket.io/lib/client.js:75:20)
    at Server.onconnection (/tmp/frontail/node_modules/socket.io/lib/index.js:317:10)
    at emitOne (events.js:96:13)
    at Server.emit (events.js:191:7)
    at Server.handshake (/tmp/frontail/node_modules/engine.io/lib/server.js:309:8)

@mthenw mthenw merged commit 2b6923a into mthenw:master Jul 3, 2017
@mthenw
Copy link
Copy Markdown
Owner

mthenw commented Jul 3, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants