Skip to content

Commit

Permalink
fix: codeql issue
Browse files Browse the repository at this point in the history
  • Loading branch information
pamapa committed May 15, 2021
1 parent 27bebf5 commit 5969bb0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions usr/var/www/callblocker/python-fcgi/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# callblocker - blocking unwanted calls from your home phone
# Copyright (C) 2015-2020 Patrick Ammann <pammann@gmx.net>
# Copyright (C) 2015-2021 Patrick Ammann <pammann@gmx.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -242,7 +242,9 @@ def handle_get_lists(environ, start_response, params):
return ['Not Found']

merge_name = os.path.basename(post.getvalue('merge'))
tmp_name = os.path.join("/tmp", post['uploadedfile'].filename)
tmp_name = os.path.normpath(os.path.join("/tmp", post['uploadedfile'].filename))
if not tmp_name.startswith("/tmp"):
raise SecurityException()
tmp_file = post['uploadedfile'].file
#print("POST tmp_name=%s\n" % tmp_name, file=sys.stderr)

Expand Down

0 comments on commit 5969bb0

Please sign in to comment.