镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-06 06:26:47 +00:00
merge to resolve multiple pickle security issues (#1728)
* 注释调试if分支 * support pdf url for latex translation * Merge pull request from GHSA-mvrw-h7rc-22r8 * 注释调试if分支 * Improve objload security * Update README.md * support pdf url for latex translation --------- Co-authored-by: binary-husky <96192199+binary-husky@users.noreply.github.com> Co-authored-by: binary-husky <qingxu.fu@outlook.com> * fix import --------- Co-authored-by: Longtaotao <longtaotao@bupt.edu.cn> Co-authored-by: iluem <57590186+Qhaoduoyu@users.noreply.github.com>
这个提交包含在:
17
toolbox.py
17
toolbox.py
@@ -868,23 +868,6 @@ class ProxyNetworkActivate:
|
||||
return
|
||||
|
||||
|
||||
def objdump(obj, file="objdump.tmp"):
|
||||
import pickle
|
||||
|
||||
with open(file, "wb+") as f:
|
||||
pickle.dump(obj, f)
|
||||
return
|
||||
|
||||
|
||||
def objload(file="objdump.tmp"):
|
||||
import pickle, os
|
||||
|
||||
if not os.path.exists(file):
|
||||
return
|
||||
with open(file, "rb") as f:
|
||||
return pickle.load(f)
|
||||
|
||||
|
||||
def Singleton(cls):
|
||||
"""
|
||||
一个单实例装饰器
|
||||
|
||||
在新工单中引用
屏蔽一个用户