Skip to content

Commit

Permalink
Checking cookie error in websocket handshake.
Browse files Browse the repository at this point in the history
  • Loading branch information
dddomodossola committed Nov 27, 2018
1 parent 015f8be commit 5b97d51
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion remi/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,10 @@ def send_message(self, message):
def handshake(self):
self._log.debug('handshake')
key = self.headers['Sec-WebSocket-Key']
self.session = parse_session_cookie(self.headers['cookie'])
self.session = None
if 'cookie' in self.headers:
if self.headers['cookie']!=None:
self.session = parse_session_cookie(self.headers['cookie'])
if self.session == None:
return False
if not self.session in clients.keys():
Expand Down

0 comments on commit 5b97d51

Please sign in to comment.