app: fix unauthorized file upload access

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2021-04-20 15:03:17 -04:00
parent d42fd3b095
commit 2b79a129aa
1 changed files with 1 additions and 0 deletions

View File

@ -602,6 +602,7 @@ class FileUploadHandler(AuthorizedRequestHandler):
self.max_upload_size = max_upload_size
def prepare(self):
super(FileUploadHandler, self).prepare()
if self.request.method == "POST":
self.request.connection.set_max_body_size(self.max_upload_size)
tmpname = self.file_manager.gen_temp_upload_path()