Check for no domain

merge-requests/30/head
Bob Mottram 2022-03-23 22:49:37 +00:00
parent b8aa529adc
commit aab90e75da
2 changed files with 11 additions and 6 deletions

View File

@ -7765,12 +7765,15 @@ class PubServer(BaseHTTPRequestHandler):
self.server.news_instance,
authorized,
access_keys, is_group).encode('utf-8')
msglen = len(msg)
self._set_headers('text/html', msglen,
cookie, calling_domain, False)
self._write(msg)
fitness_performance(getreq_start_time, self.server.fitness,
'_GET', '_show_person_options', debug)
if msg:
msglen = len(msg)
self._set_headers('text/html', msglen,
cookie, calling_domain, False)
self._write(msg)
fitness_performance(getreq_start_time, self.server.fitness,
'_GET', '_show_person_options', debug)
else:
self._404()
return
if '/users/news/' in path:

View File

@ -66,6 +66,8 @@ def html_person_options(default_timeline: str,
"""Show options for a person: view/follow/block/report
"""
options_domain, options_port = get_domain_from_actor(options_actor)
if not options_domain:
return None
options_domain_full = get_full_domain(options_domain, options_port)
if os.path.isfile(base_dir + '/accounts/options-background-custom.jpg'):