Skip to content

Commit

Permalink
Merge pull request #3763 from kushaldas/fix_file_handling_3758
Browse files Browse the repository at this point in the history
Fixes #3758 checks file value before accessing it
  • Loading branch information
emkll authored Aug 31, 2018
2 parents 91ef65a + 4132731 commit 6098d75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion securedrop/source_app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ def lookup():
@login_required
def submit():
msg = request.form['msg']
fh = request.files['fh']
fh = None
if 'fh' in request.files:
fh = request.files['fh']

# Don't submit anything if it was an "empty" submission. #878
if not (msg or fh):
Expand Down

0 comments on commit 6098d75

Please sign in to comment.