Remove trailing part of token

main
Bob Mottram 2019-11-26 17:30:22 +00:00
parent ed476f6726
commit 85f3f2313b
1 changed files with 2 additions and 0 deletions

View File

@ -919,6 +919,8 @@ class PubServer(BaseHTTPRequestHandler):
if self.headers.get('Cookie'): if self.headers.get('Cookie'):
if self.headers['Cookie'].startswith('epicyon='): if self.headers['Cookie'].startswith('epicyon='):
tokenStr=self.headers['Cookie'].split('=',1)[1] tokenStr=self.headers['Cookie'].split('=',1)[1]
if ';' in tokenStr:
tokenStr=tokenStr.split(';')[0]
if self.server.tokensLookup.get(tokenStr): if self.server.tokensLookup.get(tokenStr):
nickname=self.server.tokensLookup[tokenStr] nickname=self.server.tokensLookup[tokenStr]
# default to the inbox of the person # default to the inbox of the person