diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-06-21 11:33:46 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-06-21 11:33:46 +0200 |
commit | d8c419c304ad783d419f77aa03e83ee1adf23efd (patch) | |
tree | 3cc8e5e2f22c9c5b99e2cccafa5f3b7e5eea9e33 /lib | |
parent | 3e94faef06b345ff92d990d033141fed6ef2915a (diff) | |
download | nextcloud-server-d8c419c304ad783d419f77aa03e83ee1adf23efd.tar.gz nextcloud-server-d8c419c304ad783d419f77aa03e83ee1adf23efd.zip |
Explicitely only accept closures from our dependencies in ClosureJob
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Command/ClosureJob.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/Command/ClosureJob.php b/lib/private/Command/ClosureJob.php index 96b0947129e..5639852e4db 100644 --- a/lib/private/Command/ClosureJob.php +++ b/lib/private/Command/ClosureJob.php @@ -23,10 +23,13 @@ namespace OC\Command; use OC\BackgroundJob\QueuedJob; +use Laravel\SerializableClosure\SerializableClosure as LaravelClosure; +use Opis\Closure\SerializableClosure as OpisClosure; class ClosureJob extends QueuedJob { protected function run($serializedCallable) { - $callable = unserialize($serializedCallable)->getClosure(); + $callable = unserialize($serializedCallable, [LaravelClosure::class, OpisClosure::class]); + $callable = $callable->getClosure(); if (is_callable($callable)) { $callable(); } else { |