Skip to content

Commit

Permalink
Skip invalid onions bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcutme committed Dec 30, 2016
1 parent bc7042b commit dfb5a00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/disabled-Bootstrapper/BootstrapperDb.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def peerList(self, hash, ip4=None, onions=[], port=None, limit=30, need_types=["

where = "hash_id = :hashid"
if onions:
onions_escaped = ["'%s'" % re.sub("[^a-z0-9,]", "", onion) for onion in onions]
onions_escaped = ["'%s'" % re.sub("[^a-z0-9,]", "", onion) for onion in onions if type(onion) is str]
where += " AND (onion NOT IN (%s) OR onion IS NULL)" % ",".join(onions_escaped)
elif ip4:
where += " AND (NOT (ip4 = :ip4 AND port = :port) OR ip4 IS NULL)"
Expand Down

0 comments on commit dfb5a00

Please sign in to comment.