summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2018-12-05 20:46:01 -0800
committerMicah Lee <micah@micahflee.com>2018-12-05 20:46:01 -0800
commit657806a003a2fc2fb074f149ac8802ef99ad090e (patch)
tree2530f2f47a92d57156d8b95b18e6e2b5d55bd26b
parent1d1efb7e54bcc6dbfc56703a257f1de9f1ca3265 (diff)
downloadonionshare-657806a003a2fc2fb074f149ac8802ef99ad090e.tar.gz
onionshare-657806a003a2fc2fb074f149ac8802ef99ad090e.zip
Only allow starting v3 onion services if the tor that we're connected to supports it
-rw-r--r--onionshare/onion.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/onionshare/onion.py b/onionshare/onion.py
index 6673f8ee..3aeffe91 100644
--- a/onionshare/onion.py
+++ b/onionshare/onion.py
@@ -406,7 +406,7 @@ class Onion(object):
# Does this version of Tor support next-gen ('v3') onions?
# Note, this is the version of Tor where this bug was fixed:
# https://trac.torproject.org/projects/tor/ticket/28619
- self.supports_v3_onions = self.tor_version > Version('0.4.0.0')
+ self.supports_v3_onions = self.tor_version >= Version('0.4.0.0')
def is_authenticated(self):
"""
@@ -464,7 +464,7 @@ class Onion(object):
else:
key_type = "NEW"
# Work out if we can support v3 onion services, which are preferred
- if Version(self.tor_version) >= Version('0.3.3.1') and not self.settings.get('use_legacy_v2_onions'):
+ if self.supports_v3_onions and not self.settings.get('use_legacy_v2_onions'):
key_content = "ED25519-V3"
else:
# fall back to v2 onion services