merge-requests/30/head
Bob Mottram 2022-02-15 15:26:09 +00:00
parent 351658dc35
commit d918368284
1 changed files with 5 additions and 2 deletions

View File

@ -1189,11 +1189,14 @@ class PubServer(BaseHTTPRequestHandler):
def _show_vcard(self, base_dir: str, path: str, calling_domain: str,
referer_domain: str, domain: str, debug: bool) -> bool:
"""Returns a vcard for the given account
"""
if not self._has_accept(calling_domain):
return False
if 'text/vcard' not in self.headers['Accept']:
accept_str = self.headers['Accept']
if 'text/vcard' not in accept_str:
return False
if 'application/' in self.headers['Accept']:
if 'application/' in accept_str:
return False
if not path.startswith('/users/'):
self._400()