chg: [domain lookup] extract domain from url input

pull/607/merge
terrtia 2024-10-04 13:44:50 +02:00
parent 5a052c47d9
commit d91e14f200
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 2 additions and 0 deletions

View File

@ -69,6 +69,8 @@ faup = Faup()
def api_get_onion_lookup(domain):
domain = domain.lower()
url_unpack = unpack_url(domain)
domain = url_unpack['domain']
dom = Domain(domain)
if not is_valid_onion_v3_domain(domain):
return {'error': 'Invalid Domain', 'domain': domain}, 404