From c63912ed05e933d417537d82e9652e72fdd47198 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 25 Feb 2021 18:25:41 +0000 Subject: [PATCH] Redirect to login screen --- daemon.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/daemon.py b/daemon.py index b5349c621..5df1ced52 100644 --- a/daemon.py +++ b/daemon.py @@ -10373,6 +10373,18 @@ class PubServer(BaseHTTPRequestHandler): if '/users/' in self.path: usersInPath = True + # redirect to the welcome screen + if htmlGET and authorized and usersInPath: + nickname = self.path.split('/users/')[1] + if '/' in nickname: + nickname = nickname.split('/')[0] + if '?' in nickname: + nickname = nickname.split('?')[0] + if not isWelcomeScreenComplete(self.server.baseDir, + nickname, + self.server.domain): + self.path = '/users/' + nickname + '/welcome' + if not htmlGET and \ usersInPath and self.path.endswith('/pinned'): nickname = self.path.split('/users/')[1]