mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-05 05:22:17 -04:00
only set self.private_key after the Onion service has started, if we received a new one
This commit is contained in:
parent
de36fea474
commit
d5140be046
2 changed files with 4 additions and 1 deletions
|
@ -425,6 +425,8 @@ class Onion(object):
|
|||
# A new private key was generated and is in the Control port response.
|
||||
if not self.settings.get('private_key'):
|
||||
self.private_key = res.private_key
|
||||
else:
|
||||
self.private_key = ''
|
||||
|
||||
if self.stealth:
|
||||
# Similar to the PrivateKey, the Control port only returns the ClientAuth
|
||||
|
|
|
@ -78,7 +78,8 @@ class OnionShare(object):
|
|||
|
||||
self.onion_host = self.onion.start_onion_service(self.port)
|
||||
|
||||
self.private_key = self.onion.private_key
|
||||
if self.onion.private_key:
|
||||
self.private_key = self.onion.private_key
|
||||
|
||||
if self.stealth:
|
||||
self.auth_string = self.onion.auth_string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue