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

Remove ability to __setstate__ from "legacy" tuple format soon #1091

Open
djipko opened this issue Jan 26, 2023 · 0 comments
Open

Remove ability to __setstate__ from "legacy" tuple format soon #1091

djipko opened this issue Jan 26, 2023 · 0 comments

Comments

@djipko
Copy link
Contributor

djipko commented Jan 26, 2023

This original issue #1004 describes the problem with returning a tuple from __setstate__, so #1009 removed it. But once new release was actually cut #1085 reported that this actually broke a lot of stuff, and support for unpickling from tuple was added back in.

The problem with this is that anyone who stores pickled representations of their objects with code using versions prior to 22.2 is till vulnerable to the issue described in #1004 ( potentially assigning a wrong value to a an attribute on unpickle).

Let's try to really remove the support for tuple on deserialisation in a newer version (best is 22.3) once more people have had a chance to re-process their data using newer code.

I don't think we can ever guarantee that no one in the world will be hit by the issue like #1085 again, but at leas at this point there will be an officially released version (the first one containing #1085) that can be used to re-process the data once the support is gone from trunk.

Storing data in long term storage remains a bad idea that maybe Python official docs could do more to warn people about alongside the security concerns (which are very prominent in the docs).

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

No branches or pull requests

1 participant