thiemowmde added a subscriber: WMDE-leszek. thiemowmde added a comment.
Oh, got it. It's the wrong way around. The weird code was added in patchset 20 in July 2018, apparently by @WMDE-leszek: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/441203/19..20/lib/includes/SimpleCacheWithBagOStuff.php. The commit message was edited in the same patchset. It mentions 3 sources, but I can't find `utf8_…` mentioned on these pages. I tried to read the discussion, but it's not very helpful. Unfortunately I wasn't involved back then. There is also no Phabricator task linked. What's done in the code directly after the weird `utf8_encode` is a `hash_hmac` call. Could it be that this is not able to work with UTF-8 strings, but expects something else? What is `SimpleCacheWithBagOStuff` even used for? What does the extra hashing do? My suggestion is to not touch this class, but mark it as deprecated and replace all usages with something reliable from core. An alternative is to change the serialization format and add a 3rd array element with a version number `2`. Cache entries without this number are still passed through the old deserialization. TASK DETAIL https://phabricator.wikimedia.org/T324202 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: thiemowmde Cc: WMDE-leszek, thiemowmde, Paladox, Michael, ItamarWMDE, Aklapper, Lucas_Werkmeister_WMDE, Danny_Benjafield_WMDE, Astuthiodit_1, malberts, karapayneWMDE, Invadibot, maantietaja, Akuckartz, darthmon_wmde, Nandana, Lahi, Gq86, GoranSMilovanovic, TK-999, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Lydia_Pintscher, Jdforrester-WMF, Mbch331
_______________________________________________ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org