mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed issue where login-with cookie didn't work as expected
This commit is contained in:
@@ -21,10 +21,11 @@ function remove_name_from_db(guid, name) {
|
||||
|
||||
function getSession(socket) {
|
||||
try {
|
||||
var cookieParser = require("cookie-parser");
|
||||
/*var cookieParser = require("cookie-parser");
|
||||
var cookie = require("cookie");
|
||||
var parsedCookies = cookie.parse(socket.handshake.headers.cookie);
|
||||
return parsedCookies["_uI"];
|
||||
return parsedCookies["_uI"];*/
|
||||
return socket.guid;
|
||||
} catch(e) {
|
||||
return "empty";
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ module.exports = function() {
|
||||
socket.emit("get_list");
|
||||
|
||||
var guid = Functions.hash_pass(socket.handshake.headers["user-agent"] + socket.handshake.address + socket.handshake.headers["accept-language"]);
|
||||
|
||||
socket.guid = guid;
|
||||
socket.on('close', function() {
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user