From a0a158bf0b866b798db4d425a453969135d77bbf Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 26 Nov 2019 17:47:56 +0000 Subject: [PATCH] Strip the token string --- daemon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon.py b/daemon.py index 285101a19..50ea81bf0 100644 --- a/daemon.py +++ b/daemon.py @@ -918,9 +918,9 @@ class PubServer(BaseHTTPRequestHandler): # token based authenticated used by the web interface if self.headers.get('Cookie'): if self.headers['Cookie'].startswith('epicyon='): - tokenStr=self.headers['Cookie'].split('=',1)[1] + tokenStr=self.headers['Cookie'].split('=',1)[1].strip() if ';' in tokenStr: - tokenStr=tokenStr.split(';')[0] + tokenStr=tokenStr.split(';')[0].strip() if self.server.tokensLookup.get(tokenStr): nickname=self.server.tokensLookup[tokenStr] # default to the inbox of the person