Skip to content

Commit

Permalink
Revert "Fix (security) : Path Traversal Bug" (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuyuanmao authored Jul 11, 2022
1 parent 444c410 commit 7d1a324
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/agent/kubernetes-agent/src/utils/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def download_file(url, target_dir):
content_type = r.headers["content-type"]
extension = mimetypes.guess_extension(content_type)
file_name = "%s%s" % (uuid4().hex, extension)
target_file = os.path.join(target_dir, secure(file_name))
target_file = os.path.join(target_dir, file_name)

if not os.path.exists(target_dir):
os.makedirs(target_dir)
Expand Down

0 comments on commit 7d1a324

Please sign in to comment.