Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pickle is always enabled #50

Open
KennyChenBasis opened this issue Sep 13, 2022 · 1 comment · May be fixed by #52
Open

pickle is always enabled #50

KennyChenBasis opened this issue Sep 13, 2022 · 1 comment · May be fixed by #52

Comments

@KennyChenBasis
Copy link

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.

@lebedov
Copy link
Owner

lebedov commented Sep 13, 2022

Sure - feel free to send in a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants