Expand 'public mode' (optional slugs) to be possible for sharing too, not just receiving, with no rate-limiting/self-destruct on invalid routes.

This commit is contained in:
Miguel Jacq 2018-07-21 17:06:11 +10:00
parent b27b0c20d9
commit e89a74729b
8 changed files with 87 additions and 47 deletions

View file

@ -314,7 +314,7 @@ class ServerStatus(QtWidgets.QWidget):
"""
Returns the OnionShare URL.
"""
if self.mode == ServerStatus.MODE_RECEIVE and self.common.settings.get('receive_public_mode'):
if self.common.settings.get('public_mode'):
url = 'http://{0:s}'.format(self.app.onion_host)
else:
url = 'http://{0:s}/{1:s}'.format(self.app.onion_host, self.web.slug)