[Pkg-privacy-commits] [onionshare] 32/256: Catch all exceptions when checking for stealth support, not just TypeError, to successfully identity old versions of stem
Ulrike Uhlig
ulrike at moszumanska.debian.org
Fri May 26 12:53:06 UTC 2017
This is an automated email from the git hooks/post-receive script.
ulrike pushed a commit to branch master
in repository onionshare.
commit 6fdef85878413ececdc14f85437a4eeefe9eb822
Author: Micah Lee <micah at micahflee.com>
Date: Thu Dec 22 17:07:01 2016 -0800
Catch all exceptions when checking for stealth support, not just TypeError, to successfully identity old versions of stem
---
onionshare/onion.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/onionshare/onion.py b/onionshare/onion.py
index 3da2935..40fc30a 100644
--- a/onionshare/onion.py
+++ b/onionshare/onion.py
@@ -99,12 +99,16 @@ class Onion(object):
self.supports_ephemeral = callable(list_ephemeral_hidden_services) and tor_version >= '0.2.7.1'
# do the versions of stem and tor that I'm using support stealth onion services?
+ if self.stealth:
+ self.check_for_stealth_support()
+
+ def check_for_stealth_support(self):
try:
res = self.c.create_ephemeral_hidden_service({1:1}, basic_auth={'onionshare':None}, await_publication=False)
tmp_service_id = res.content()[0][2].split('=')[1]
self.c.remove_ephemeral_hidden_service(tmp_service_id)
self.supports_stealth = True
- except TypeError:
+ except:
# ephemeral stealth onion services are not supported
self.supports_stealth = False
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionshare.git
More information about the Pkg-privacy-commits
mailing list