OSDN Git Service
(root)
/
webchat
/
WebChat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1173b7a
)
チャットルームへの接続時にセッションが存在しない場合ははじくようにした
author
konekoneko
<jbh03215@hotmail.co.jp>
Tue, 4 Jun 2013 12:30:07 +0000
(21:30 +0900)
committer
konekoneko
<jbh03215@hotmail.co.jp>
Tue, 4 Jun 2013 12:30:07 +0000
(21:30 +0900)
chat.js
patch
|
blob
|
history
diff --git
a/chat.js
b/chat.js
index
c49bb9d
..
2e901f4
100644
(file)
--- a/
chat.js
+++ b/
chat.js
@@
-478,9
+478,11
@@
function ParseAuthorization(handshakeData, callback)
result = "failed get from session store";
\r
else if(err)
\r
result = err;
\r
result = "failed get from session store";
\r
else if(err)
\r
result = err;
\r
+ else if(typeof(session) == "undefined" || typeof(session._csrf) == "undefined")
\r
+ result = "session is undefined";
\r
else if(handshakeData.query.token != session._csrf)
\r
result = "invaild token";
\r
else if(handshakeData.query.token != session._csrf)
\r
result = "invaild token";
\r
- if(
typeof(session) != "undefined" &&
result == null)
\r
+ if(result == null)
\r
handshakeData.sessionID = sessionID;
\r
callback(result,result == null && !err);
\r
});
\r
handshakeData.sessionID = sessionID;
\r
callback(result,result == null && !err);
\r
});
\r