From 9ec783c6a2e0d99ce3038de6756b2059a0604cc7 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Sat, 19 May 2018 21:20:51 -0700 Subject: [PATCH] Fix bug where ReceiveModeRequest was not recognizing an upload request if the POST included a slug when receive_public_mode == True --- onionshare/web.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/onionshare/web.py b/onionshare/web.py index 3d1279ce..a3144eb2 100644 --- a/onionshare/web.py +++ b/onionshare/web.py @@ -692,12 +692,12 @@ class ReceiveModeRequest(Request): # Is this a valid upload request? self.upload_request = False if self.method == 'POST': - if self.web.common.settings.get('receive_public_mode'): - if self.path == '/upload': - self.upload_request = True + if self.path == '/{}/upload'.format(self.web.slug): + self.upload_request = True else: - if self.path == '/{}/upload'.format(self.web.slug): - self.upload_request = True + if self.web.common.settings.get('receive_public_mode'): + if self.path == '/upload': + self.upload_request = True if self.upload_request: # A dictionary that maps filenames to the bytes uploaded so far