From 0d3d4aae1d14ed0973bb99e689f28c20668eeff0 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Wed, 5 Jun 2019 16:41:59 +0200 Subject: [PATCH] fix: [paste_submit UI] filter empty file field --- var/www/modules/PasteSubmit/Flask_PasteSubmit.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/var/www/modules/PasteSubmit/Flask_PasteSubmit.py b/var/www/modules/PasteSubmit/Flask_PasteSubmit.py index 51b5f2b2..6b7f5360 100644 --- a/var/www/modules/PasteSubmit/Flask_PasteSubmit.py +++ b/var/www/modules/PasteSubmit/Flask_PasteSubmit.py @@ -295,10 +295,11 @@ def submit(): paste_content = request.form['paste_content'] is_file = False - file = request.files['file'] - if file: - if file.filename: - is_file = True + if 'file' in request.files: + file = request.files['file'] + if file: + if file.filename: + is_file = True submitted_tag = 'infoleak:submission="manual"'