mirror of
https://github.com/nextcloud/server.git
synced 2026-05-25 02:34:12 -04:00
Merge pull request #46058 from nextcloud/fix/task-processing-input-validation
Fix task processing input validation
This commit is contained in:
commit
beececf660
1 changed files with 2 additions and 1 deletions
|
|
@ -489,7 +489,8 @@ class Manager implements IManager {
|
|||
* @psalm-template T
|
||||
*/
|
||||
private function removeSuperfluousArrayKeys(array $array, ...$specs): array {
|
||||
$keys = array_unique(array_reduce($specs, fn ($carry, $spec) => $carry + array_keys($spec), []));
|
||||
$keys = array_unique(array_reduce($specs, fn ($carry, $spec) => array_merge($carry, array_keys($spec)), []));
|
||||
$keys = array_filter($keys, fn ($key) => array_key_exists($key, $array));
|
||||
$values = array_map(fn (string $key) => $array[$key], $keys);
|
||||
return array_combine($keys, $values);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue