commit e1ff51c04554d51616d2845f92ab726cb0e5831a
Author: Vincent Untz <email address hidden>
Date: Thu Jun 21 14:37:41 2012 +0200
Do not use pickle for serialization in memcache, but JSON
We don't want to use pickle as it can execute arbitrary code. JSON is
safer. However, note that it supports serialization for only some
specific subset of object types; this should be enough for what we need,
though.
To avoid issues on upgrades (unability to read pickled values, and cache
poisoning for old servers not understanding JSON), we add a
memcache_serialization_support configuration option, with the following
values:
0 = older, insecure pickle serialization
1 = json serialization but pickles can still be read (still insecure)
2 = json serialization only (secure and the default)
To avoid an instant full cache flush, existing installations should
upgrade with 0, then set to 1 and reload, then after some time (24
hours) set to 2 and reload. Support for 0 and 1 will be removed in
future versions.
Reviewed: https:/ /review. openstack. org/9105 github. com/openstack/ swift/commit/ e1ff51c04554d51 616d2845f92ab72 6cb0e5831a
Committed: http://
Submitter: Jenkins
Branch: master
commit e1ff51c04554d51 616d2845f92ab72 6cb0e5831a
Author: Vincent Untz <email address hidden>
Date: Thu Jun 21 14:37:41 2012 +0200
Do not use pickle for serialization in memcache, but JSON
We don't want to use pickle as it can execute arbitrary code. JSON is
safer. However, note that it supports serialization for only some
specific subset of object types; this should be enough for what we need,
though.
To avoid issues on upgrades (unability to read pickled values, and cache serialization_ support configuration option, with the following
poisoning for old servers not understanding JSON), we add a
memcache_
values:
0 = older, insecure pickle serialization
1 = json serialization but pickles can still be read (still insecure)
2 = json serialization only (secure and the default)
To avoid an instant full cache flush, existing installations should
upgrade with 0, then set to 1 and reload, then after some time (24
hours) set to 2 and reload. Support for 0 and 1 will be removed in
future versions.
Part of bug 1006414.
Change-Id: Id7d6d547b103b4 f23ebf5be98b88f 09ec6027ce4