Remove trailing part of token

merge-requests/6/head
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['Cookie'].startswith('epicyon='):
tokenStr=self.headers['Cookie'].split('=',1)[1]
if ';' in tokenStr:
tokenStr=tokenStr.split(';')[0]
if self.server.tokensLookup.get(tokenStr):
nickname=self.server.tokensLookup[tokenStr]
# default to the inbox of the person