Skip to content

Commit 232fb61

Browse files
authored
Merge pull request #60884 from XananasX7/security/taskprocessing-unserialize-allowed-classes
fix(TaskProcessing): restrict allowed_classes in Manager cache deserialization
2 parents 09f1bb2 + e8c101f commit 232fb61

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/private/TaskProcessing/Manager.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,13 @@ public function getAvailableTaskTypes(bool $showDisabled = false, ?string $userI
938938
if ($this->availableTaskTypes === null) {
939939
$cachedValue = $this->distributedCache->get($cacheKey);
940940
if ($cachedValue !== null) {
941-
$this->availableTaskTypes = unserialize($cachedValue);
941+
$this->availableTaskTypes = unserialize($cachedValue, [
942+
'allowed_classes' => [
943+
ShapeDescriptor::class,
944+
ShapeEnumValue::class,
945+
EShapeType::class,
946+
],
947+
]);
942948
}
943949
}
944950
// Either we have no cache or showDisabled is turned on, which we don't want to cache, ever.

0 commit comments

Comments
 (0)