Skip to content

Commit

Permalink
fix: [domain search] check if onion is valid before sending to spider
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrtia committed Feb 19, 2025
1 parent 67e915a commit efbbad4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions var/www/blueprints/crawler_splash.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ def domain_discovery():
user_org = current_user.get_org()
user_id = current_user.get_user_id()
domain = request.args.get('domain')
if not crawlers.is_valid_onion_domain(domain):
return create_json_response({'status': 'error', 'reason': 'Invalid onion domain'}, 400)

data = {'depth': 1, 'har': True, 'screenshot': True, 'url': f'http://{domain}', 'proxy': 'force_tor'}
res = crawlers.api_add_crawler_task(data, user_org, user_id=user_id)

Expand Down

0 comments on commit efbbad4

Please sign in to comment.