mirror of https://gitlab.com/bashrc2/epicyon
Alternatives to #main-key
See https://datatracker.ietf.org/doc/html/rfc6901#section-6merge-requests/30/head
parent
965208495a
commit
ca96504528
3
cache.py
3
cache.py
|
@ -147,6 +147,9 @@ def get_person_pub_key(base_dir: str, session, person_url: str,
|
||||||
"""
|
"""
|
||||||
if not person_url:
|
if not person_url:
|
||||||
return None
|
return None
|
||||||
|
if '#/publicKey' in person_url:
|
||||||
|
person_url = person_url.replace('#/publicKey', '')
|
||||||
|
else:
|
||||||
person_url = person_url.replace('#main-key', '')
|
person_url = person_url.replace('#main-key', '')
|
||||||
users_paths = get_user_paths()
|
users_paths = get_user_paths()
|
||||||
for possible_users_path in users_paths:
|
for possible_users_path in users_paths:
|
||||||
|
|
|
@ -709,7 +709,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if signature_item.startswith('keyId='):
|
if signature_item.startswith('keyId='):
|
||||||
if '"' in signature_item:
|
if '"' in signature_item:
|
||||||
key_id = signature_item.split('"')[1]
|
key_id = signature_item.split('"')[1]
|
||||||
# remove #main-key
|
# remove #/main-key or #main-key
|
||||||
if '#' in key_id:
|
if '#' in key_id:
|
||||||
key_id = key_id.split('#')[0]
|
key_id = key_id.split('#')[0]
|
||||||
return key_id
|
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) -> {}:
|
def person_lookup(domain: str, path: str, base_dir: str) -> {}:
|
||||||
"""Lookup the person for an given nickname
|
"""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', '')
|
path = path.replace('#main-key', '')
|
||||||
# is this a shared inbox lookup?
|
# is this a shared inbox lookup?
|
||||||
is_shared_inbox = False
|
is_shared_inbox = False
|
||||||
|
|
Loading…
Reference in New Issue