From 375550c331781152db7fb87e516f711ca5d90e6f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 9 Jan 2023 22:30:05 +0000 Subject: [PATCH] Only return path --- webfinger.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webfinger.py b/webfinger.py index b9686d387..bca2c30cc 100644 --- a/webfinger.py +++ b/webfinger.py @@ -255,6 +255,7 @@ def webfinger_meta(http_prefix: str, domain_full: str) -> str: def wellknown_protocol_handler(path: str, base_dir: str, http_prefix: str, domain_full: str) -> {}: """See https://fedi-to.github.io/protocol-handler.html + Only return the path, not the full url """ if not path.startswith('/.well-known/protocol-handler?'): return None @@ -281,7 +282,7 @@ def wellknown_protocol_handler(path: str, base_dir: str, domain = domain_full # not an open redirect if domain == domain_full: - return http_prefix + '://' + domain_full + '/users/' + nickname + return '/users/' + nickname return None