Skip to content

Commit

Permalink
Fixed unsecured tempfile.mktemp() command usage (#3446)
Browse files Browse the repository at this point in the history
* Fixed unsecured tempfile.mktemp() command usage

* Added proper tuple handling
  • Loading branch information
vladvildanov authored Nov 28, 2024
1 parent 3d45064 commit c73a43d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -1521,8 +1521,8 @@ def test_set_path(client):

root = tempfile.mkdtemp()
sub = tempfile.mkdtemp(dir=root)
jsonfile = tempfile.mktemp(suffix=".json", dir=sub)
nojsonfile = tempfile.mktemp(dir=root)
jsonfile = tempfile.mkstemp(suffix=".json", dir=sub)[1]
nojsonfile = tempfile.mkstemp(dir=root)[1]

with open(jsonfile, "w+") as fp:
fp.write(json.dumps({"hello": "world"}))
Expand Down

0 comments on commit c73a43d

Please sign in to comment.