Skip to content

Commit 9d478bb

Browse files
Merge pull request #60984 from nextcloud/backport/60884/stable33
[stable33] fix(TaskProcessing): restrict allowed_classes in Manager cache deserialization
2 parents 39c41d3 + af5f9ae commit 9d478bb

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
@@ -871,7 +871,13 @@ public function getAvailableTaskTypes(bool $showDisabled = false, ?string $userI
871871
if ($this->availableTaskTypes === null) {
872872
$cachedValue = $this->distributedCache->get($cacheKey);
873873
if ($cachedValue !== null) {
874-
$this->availableTaskTypes = unserialize($cachedValue);
874+
$this->availableTaskTypes = unserialize($cachedValue, [
875+
'allowed_classes' => [
876+
ShapeDescriptor::class,
877+
ShapeEnumValue::class,
878+
EShapeType::class,
879+
],
880+
]);
875881
}
876882
}
877883
// Either we have no cache or showDisabled is turned on, which we don't want to cache, ever.

0 commit comments

Comments
 (0)