镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-05 22:16:49 +00:00
raise error when the uploaded tar contain hard/soft link
这个提交包含在:
@@ -111,6 +111,8 @@ def extract_archive(file_path, dest_dir):
|
||||
member_path = os.path.normpath(member.name)
|
||||
full_path = os.path.join(dest_dir, member_path)
|
||||
full_path = os.path.abspath(full_path)
|
||||
if member.islnk() or member.issym():
|
||||
raise Exception(f"Attempted Symlink in {member.name}")
|
||||
if not full_path.startswith(os.path.abspath(dest_dir) + os.sep):
|
||||
raise Exception(f"Attempted Path Traversal in {member.name}")
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户