Throw a 403 on the index pages if the timer has run out but an upload is in progress

This commit is contained in:
Miguel Jacq 2018-09-20 11:33:37 +10:00
parent c3755389dd
commit 997e2f87ee
No known key found for this signature in database
GPG Key ID: EEA4341C6D97A0B6

View File

@ -340,10 +340,14 @@ class Web(object):
@self.app.route("/<slug_candidate>")
def index(slug_candidate):
self.check_slug_candidate(slug_candidate)
if not self.can_upload:
return self.error403()
return index_logic()
@self.app.route("/")
def index_public():
if not self.can_upload:
return self.error403()
if not self.common.settings.get('public_mode'):
return self.error404()
return index_logic()