The restricted_loads function at [api/utils/__init__.py#L215](https://github.com/infiniflow/ragflow/blob/main/api/utils/__init__.py#L215) is still vulnerable leading via code execution.
The main reson is that numpy module has a numpy.f2py.diagnose.run_command function directly execute commands, but the restricted_loads function allows users import functions in module numpy.
### Steps to reproduce
**ragflow_patch.py**
```py
importbuiltins
importio
importpickle
safe_module={
'numpy',
'rag_flow'
}
classRestrictedUnpickler(pickle.Unpickler):
deffind_class(self,module,name):
importimportlib
ifmodule.split('.')[0]insafe_module:
_module=importlib.import_module(module)
returngetattr(_module,name)
# Forbid everything else.
raisepickle.UnpicklingError("global '%s.%s' is forbidden"%
(module,name))
defrestricted_loads(src):
"""Helper function analogous to pickle.loads()."""