diff --git a/rpyc/core/netref.py b/rpyc/core/netref.py index a5e9a2eb..eed559d5 100644 --- a/rpyc/core/netref.py +++ b/rpyc/core/netref.py @@ -251,6 +251,9 @@ def method(self, start, stop, *args): def __array__(self): # Note that protocol=-1 will only work between python # interpreters of the same version. + if not object.__getattribute__(self,'____conn__')._config["allow_pickle"]: + # Security check that server side allows pickling per #551 + raise ValueError("pickling is disabled") return pickle.loads(syncreq(self, consts.HANDLE_PICKLE, -1)) __array__.__doc__ = doc return __array__