Add optional serialization_type and hmac_key param values to RESTBagOStuff
authorBill Pirkle <bpirkle@wikimedia.org>
Thu, 26 Sep 2019 17:59:15 +0000 (12:59 -0500)
committerJames D. Forrester <jforrester@wikimedia.org>
Tue, 8 Oct 2019 21:23:56 +0000 (14:23 -0700)
commit4bfbf2c225d7f45aff167613f35d7d9153abe252
tree9b52fe775dc0c15b1282c8d3918e46af9481d68d
parentd60849c5de08db4cf027325f17f1a3705e106b5d
Add optional serialization_type and hmac_key param values to RESTBagOStuff

T233537 made RESTBagOStuff work with the Kask external session
storage service, but broke backward compatibility. Add optional
values to the RESTBagOStuff $params constructor parameter to
support communicating with Kask, and to allow using HMAC. The
new values are:
  serialization_type: legacy (default), PHP, or JSON
  hmac_key: HMAC key to use for protecting the serialized blob
If these new values are not specified, behavior remains
unchanged (PHP serialization with no HMAC protection).

Bug: T233963
Change-Id: Ia2625c04e08cfe9616569500f1d613be73c170a2
(cherry picked from commit 2ed69af15cb8971e35aafc2c08397ed38c480488)
RELEASE-NOTES-1.34
includes/libs/objectcache/RESTBagOStuff.php
tests/phpunit/unit/includes/objectcache/RESTBagOStuffTest.php