From 02dcbe006afbc0ee8675da9599f577ec7d17beae Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 23 Oct 2019 23:32:07 +0100 Subject: [PATCH] Remove nickname --- daemon.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/daemon.py b/daemon.py index d3c006b6..0bd7d4ae 100644 --- a/daemon.py +++ b/daemon.py @@ -652,13 +652,6 @@ class PubServer(BaseHTTPRequestHandler): # check authorization authorized = self._isAuthorized() if authorized: - if self.path=='/': - if cookie and self.headers.get('Nickname'): - self.send_header('Location', '/users/'+self.headers['Nickname']+'/inbox') - self.send_header('Content-Length', '0') - self.send_header('X-Robots-Tag','noindex') - self.end_headers() - return if self.server.debug: print('GET Authorization granted') else: @@ -2824,7 +2817,7 @@ class PubServer(BaseHTTPRequestHandler): del self.server.salts[loginNickname] self.send_response(303) self.send_header('Content-Length', '0') - self.send_header('Set-Cookie', 'epicyon=; Nickname=; SameSite=Strict') + self.send_header('Set-Cookie', 'epicyon=; SameSite=Strict') self.send_header('Location', '/login') self.send_header('X-Robots-Tag','noindex') self.end_headers() @@ -2850,7 +2843,7 @@ class PubServer(BaseHTTPRequestHandler): self.server.salts[loginNickname]=createPassword(32) self.server.tokens[loginNickname]=sha256((loginNickname+loginPassword+self.server.salts[loginNickname]).encode('utf-8')).hexdigest() self.server.tokensLookup[self.server.tokens[loginNickname]]=loginNickname - self.send_header('Set-Cookie', 'epicyon='+self.server.tokens[loginNickname]+'; Nickname='+loginNickname+'; SameSite=Strict') + self.send_header('Set-Cookie', 'epicyon='+self.server.tokens[loginNickname]+'; SameSite=Strict') self.send_header('Location', '/users/'+loginNickname+'/inbox') self.send_header('Content-Length', '0') self.send_header('X-Robots-Tag','noindex')