Check authorized nickname

merge-requests/30/head
Bob Mottram 2021-02-25 18:38:18 +00:00
parent bcc59bac97
commit 7e9937cbd0
1 changed files with 8 additions and 6 deletions

View File

@ -10381,12 +10381,14 @@ class PubServer(BaseHTTPRequestHandler):
nickname = nickname.split('/')[0] nickname = nickname.split('/')[0]
if '?' in nickname: if '?' in nickname:
nickname = nickname.split('?')[0] nickname = nickname.split('?')[0]
if not isWelcomeScreenComplete(self.server.baseDir, if nickname == self.authorizedNickname and \
nickname, self.path != '/users/' + nickname:
self.server.domain): if not isWelcomeScreenComplete(self.server.baseDir,
self._redirect_headers('/users/' + nickname + '/welcome', nickname,
cookie, callingDomain) self.server.domain):
return self._redirect_headers('/users/' + nickname + '/welcome',
cookie, callingDomain)
return
if not htmlGET and \ if not htmlGET and \
usersInPath and self.path.endswith('/pinned'): usersInPath and self.path.endswith('/pinned'):