Remove debug

main
Bob Mottram 2020-09-28 17:38:40 +01:00
parent 6111170dfe
commit 7bc0822553
1 changed files with 0 additions and 10 deletions

View File

@ -5581,11 +5581,8 @@ class PubServer(BaseHTTPRequestHandler):
YTReplacementDomain: str) -> bool: YTReplacementDomain: str) -> bool:
"""Shows the inbox timeline """Shows the inbox timeline
""" """
print('Inbox test 1')
if '/users/' in path: if '/users/' in path:
print('Inbox test 2')
if authorized: if authorized:
print('Inbox test 3')
inboxFeed = \ inboxFeed = \
personBoxJson(recentPostsCache, personBoxJson(recentPostsCache,
session, session,
@ -5597,13 +5594,11 @@ class PubServer(BaseHTTPRequestHandler):
maxPostsInFeed, 'inbox', maxPostsInFeed, 'inbox',
authorized) authorized)
if inboxFeed: if inboxFeed:
print('Inbox test 4')
if GETstartTime: if GETstartTime:
self._benchmarkGETtimings(GETstartTime, GETtimings, self._benchmarkGETtimings(GETstartTime, GETtimings,
'show status done', 'show status done',
'show inbox json') 'show inbox json')
if self._requestHTTP(): if self._requestHTTP():
print('Inbox test 5')
nickname = path.replace('/users/', '') nickname = path.replace('/users/', '')
nickname = nickname.replace('/inbox', '') nickname = nickname.replace('/inbox', '')
pageNumber = 1 pageNumber = 1
@ -5615,7 +5610,6 @@ class PubServer(BaseHTTPRequestHandler):
else: else:
pageNumber = 1 pageNumber = 1
if 'page=' not in path: if 'page=' not in path:
print('Inbox test 6')
# if no page was specified then show the first # if no page was specified then show the first
inboxFeed = \ inboxFeed = \
personBoxJson(recentPostsCache, personBoxJson(recentPostsCache,
@ -5656,7 +5650,6 @@ class PubServer(BaseHTTPRequestHandler):
'show inbox html') 'show inbox html')
if msg: if msg:
print('Inbox test 7')
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
self._set_headers('text/html', len(msg), self._set_headers('text/html', len(msg),
cookie, callingDomain) cookie, callingDomain)
@ -5667,7 +5660,6 @@ class PubServer(BaseHTTPRequestHandler):
'show status done', 'show status done',
'show inbox') 'show inbox')
else: else:
print('Inbox test 8')
# don't need authenticated fetch here because # don't need authenticated fetch here because
# there is already the authorization check # there is already the authorization check
msg = json.dumps(inboxFeed, ensure_ascii=False) msg = json.dumps(inboxFeed, ensure_ascii=False)
@ -5678,14 +5670,12 @@ class PubServer(BaseHTTPRequestHandler):
self.server.GETbusy = False self.server.GETbusy = False
return True return True
else: else:
print('Inbox test 9')
if debug: if debug:
nickname = path.replace('/users/', '') nickname = path.replace('/users/', '')
nickname = nickname.replace('/inbox', '') nickname = nickname.replace('/inbox', '')
print('DEBUG: ' + nickname + print('DEBUG: ' + nickname +
' was not authorized to access ' + path) ' was not authorized to access ' + path)
if path != '/inbox': if path != '/inbox':
print('Inbox test 10')
# not the shared inbox # not the shared inbox
if debug: if debug:
print('DEBUG: GET access to inbox is unauthorized') print('DEBUG: GET access to inbox is unauthorized')