mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-14 08:49:47 -05:00
Ensure the backend receives the latest settings object before starting the onion service, and likewise for the GUI, so that we absolutely always save the private key for persistence back to the json settings file when we need to
This commit is contained in:
parent
957d3e9c6d
commit
670044fa56
@ -438,6 +438,10 @@ class Onion(object):
|
||||
return the onion hostname.
|
||||
"""
|
||||
self.common.log('Onion', 'start_onion_service')
|
||||
# Settings may have changed in the frontend but not updated in our settings object,
|
||||
# such as persistence. Reload the settings now just to be sure.
|
||||
self.settings.load()
|
||||
|
||||
self.auth_string = None
|
||||
|
||||
if not self.supports_ephemeral:
|
||||
|
@ -240,6 +240,9 @@ class ServerStatus(QtWidgets.QWidget):
|
||||
"""
|
||||
# Set the URL fields
|
||||
if self.status == self.STATUS_STARTED:
|
||||
# The backend Onion may have saved new settings, such as the private key.
|
||||
# Reload the settings before saving new ones.
|
||||
self.common.settings.load()
|
||||
self.show_url()
|
||||
|
||||
if self.common.settings.get('save_private_key'):
|
||||
|
Loading…
Reference in New Issue
Block a user