Skip to content

Commit

Permalink
Fixed #551 by validating the server side is configured to allow pickle
Browse files Browse the repository at this point in the history
  • Loading branch information
comrumino committed Feb 23, 2024
1 parent 19a9f03 commit bba1d35
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rpyc/core/netref.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down

0 comments on commit bba1d35

Please sign in to comment.