Fix bug where ReceiveModeRequest was not recognizing an upload request if the POST included a slug when receive_public_mode == True

This commit is contained in:
Micah Lee 2018-05-19 21:20:51 -07:00
parent db7d5a6552
commit caf87b8d96
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -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