Skip to content
Commit 140ce810 authored by ntome's avatar ntome 💬
Browse files

weboob.browser.browsers: no pickling when saving cookie jar in StatesMixin

pickle may be unsafe for loading data. All we want is a cookie jar, we
can just serialize its cookies, not necessarily the whole jar with its
type and policy.

Old format is base64(compress(pickle(jar))).
New format is base64(compress(json(jar))) where JSON conversion is on
the list of cookies (taking name, value, domain, path, secure (https)
and expires).

dump_state will now save using the new format while load_state supports
both new and old format. This allows compatibility for some time, then
later old format support in load_state will be dropped too.
parent 7d42703d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment