Skip to content

Commit

Permalink
Fix getting non-sanitized tracker URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
ichorid authored and devos50 committed Feb 5, 2020
1 parent d2430bc commit 098d6f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Tribler/Core/Utilities/tracker_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ def parse_tracker_url(tracker_url):
:returns: a tuple of size 3 containing the scheme, a tuple of hostname and port,
and path of the url
"""
url = urlparse(tracker_url)
tracker_url_sanitized = get_uniformed_tracker_url(tracker_url)
if tracker_url_sanitized is None:
raise MalformedTrackerURLException(u'Could not sanitize url (%s).' % tracker_url_sanitized)

url = urlparse(tracker_url_sanitized)
if not (url.scheme == 'udp' or url.scheme == 'http'):
raise MalformedTrackerURLException(u'Unexpected tracker type (%s).' % url.scheme)

Expand Down

0 comments on commit 098d6f3

Please sign in to comment.