From dfb5a00c77a3843dd972bee57cd562ccb778b481 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Fri, 30 Dec 2016 18:52:23 +0100 Subject: [PATCH] Skip invalid onions bootstrap --- plugins/disabled-Bootstrapper/BootstrapperDb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/disabled-Bootstrapper/BootstrapperDb.py b/plugins/disabled-Bootstrapper/BootstrapperDb.py index 44cf58c9..94270363 100644 --- a/plugins/disabled-Bootstrapper/BootstrapperDb.py +++ b/plugins/disabled-Bootstrapper/BootstrapperDb.py @@ -130,7 +130,7 @@ class BootstrapperDb(Db): 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)"