Merge pull request #60884 from XananasX7/security/taskprocessing-unserialize-allowed-classes

fix(TaskProcessing): restrict allowed_classes in Manager cache deserialization
This commit is contained in:
Arthur Schiwon 2026-06-04 14:21:03 +02:00 committed by GitHub
commit 232fb616ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -938,7 +938,13 @@ class Manager implements IManager {
if ($this->availableTaskTypes === null) {
$cachedValue = $this->distributedCache->get($cacheKey);
if ($cachedValue !== null) {
$this->availableTaskTypes = unserialize($cachedValue);
$this->availableTaskTypes = unserialize($cachedValue, [
'allowed_classes' => [
ShapeDescriptor::class,
ShapeEnumValue::class,
EShapeType::class,
],
]);
}
}
// Either we have no cache or showDisabled is turned on, which we don't want to cache, ever.