Merge pull request #60983 from nextcloud/backport/60884/stable34

[stable34] fix(TaskProcessing): restrict allowed_classes in Manager cache deserialization
This commit is contained in:
Andy Scherzinger 2026-06-17 23:00:01 +02:00 committed by GitHub
commit 495f3082a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -939,7 +939,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.