From 52382e79564a1451161e42e911cd4616942b2c82 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 7 Oct 2024 21:04:49 +0200 Subject: [PATCH] fix(logger): Remove more parameters of other methods Signed-off-by: Joas Schilling --- lib/private/Log/ExceptionSerializer.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/lib/private/Log/ExceptionSerializer.php b/lib/private/Log/ExceptionSerializer.php index 8b895bcb6be2b..2edb7022354c7 100644 --- a/lib/private/Log/ExceptionSerializer.php +++ b/lib/private/Log/ExceptionSerializer.php @@ -29,6 +29,7 @@ namespace OC\Log; use OC\Core\Controller\SetupController; +use OC\Http\Client\Client; use OC\Security\IdentityProof\Key; use OC\Setup; use OC\SystemConfig; @@ -129,6 +130,22 @@ public function __construct( Key::class => [ '__construct' ], + Client::class => [ + 'request', + 'delete', + 'deleteAsync', + 'get', + 'getAsync', + 'head', + 'headAsync', + 'options', + 'optionsAsync', + 'patch', + 'post', + 'postAsync', + 'put', + 'putAsync', + ], \Redis::class => [ 'auth' ], @@ -219,13 +236,13 @@ private function filterTrace(array $trace) { private function removeValuesFromArgs($args, $values): array { $workArgs = []; - foreach ($args as $arg) { + foreach ($args as $key => $arg) { if (in_array($arg, $values, true)) { $arg = self::SENSITIVE_VALUE_PLACEHOLDER; } elseif (is_array($arg)) { $arg = $this->removeValuesFromArgs($arg, $values); } - $workArgs[] = $arg; + $workArgs[$key] = $arg; } return $workArgs; }