Skip to content

Commit

Permalink
webfinger bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Dec 31, 2020
1 parent 7c7e2b1 commit 9b15ca1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions webfinger.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,11 @@ def template_vars(self):
resource = util.get_required_param(self, 'resource')
try:
user, domain = util.parse_acct_uri(resource)
if domain in common.DOMAINS:
domain = user
except ValueError:
domain = urllib.parse.urlparse(resource).netloc or resource

if domain in common.DOMAINS:
domain = user

url = None
if resource.startswith('http://') or resource.startswith('https://'):
url = resource
Expand Down

0 comments on commit 9b15ca1

Please sign in to comment.