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"'