mirror of https://gitlab.com/bashrc2/epicyon
parent
965208495a
commit
ca96504528
5
cache.py
5
cache.py
|
@ -147,7 +147,10 @@ def get_person_pub_key(base_dir: str, session, person_url: str,
|
|||
"""
|
||||
if not person_url:
|
||||
return None
|
||||
person_url = person_url.replace('#main-key', '')
|
||||
if '#/publicKey' in person_url:
|
||||
person_url = person_url.replace('#/publicKey', '')
|
||||
else:
|
||||
person_url = person_url.replace('#main-key', '')
|
||||
users_paths = get_user_paths()
|
||||
for possible_users_path in users_paths:
|
||||
if person_url.endswith(possible_users_path + 'inbox'):
|
||||
|
|
|
@ -709,7 +709,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if signature_item.startswith('keyId='):
|
||||
if '"' in signature_item:
|
||||
key_id = signature_item.split('"')[1]
|
||||
# remove #main-key
|
||||
# remove #/main-key or #main-key
|
||||
if '#' in key_id:
|
||||
key_id = key_id.split('#')[0]
|
||||
return key_id
|
||||
|
|
|
@ -921,7 +921,9 @@ def add_alternate_domains(actor_json: {}, domain: str,
|
|||
def person_lookup(domain: str, path: str, base_dir: str) -> {}:
|
||||
"""Lookup the person for an given nickname
|
||||
"""
|
||||
if path.endswith('#main-key'):
|
||||
if path.endswith('#/publicKey'):
|
||||
path = path.replace('#/publicKey', '')
|
||||
elif path.endswith('#main-key'):
|
||||
path = path.replace('#main-key', '')
|
||||
# is this a shared inbox lookup?
|
||||
is_shared_inbox = False
|
||||
|
|
Loading…
Reference in New Issue