You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ability to support object arrays using pickle was recently added, but there doesn't seem to be any way to disable pickle for serialization/deserialization. One of the reasons to use msgpack is that unpickling can execute arbitrary code, so forcing pickle to always be used removes that reason. However, it should be easy to add a user-configurable option to control whether pickle can be used (e.g. add a keyword allow_pickle for encode and decode) so that both use cases are available.
I also suggest that pickling defaults be the same as numpy's (i.e. allow pickle during serialization, but disallow pickle during deserialization) since it provides the maximum functionality while being the safest.
I can write up a PR if that would be useful.
The text was updated successfully, but these errors were encountered:
The ability to support object arrays using
pickle
was recently added, but there doesn't seem to be any way to disablepickle
for serialization/deserialization. One of the reasons to usemsgpack
is that unpickling can execute arbitrary code, so forcingpickle
to always be used removes that reason. However, it should be easy to add a user-configurable option to control whetherpickle
can be used (e.g. add a keywordallow_pickle
forencode
anddecode
) so that both use cases are available.I also suggest that pickling defaults be the same as numpy's (i.e. allow pickle during serialization, but disallow pickle during deserialization) since it provides the maximum functionality while being the safest.
I can write up a PR if that would be useful.
The text was updated successfully, but these errors were encountered: