]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(logger): Remove more parameters of other methods bugfix/noid/censor-more-values 48603/head
authorJoas Schilling <coding@schilljs.com>
Mon, 7 Oct 2024 19:04:49 +0000 (21:04 +0200)
committerJoas Schilling <coding@schilljs.com>
Mon, 7 Oct 2024 19:04:49 +0000 (21:04 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/Log/ExceptionSerializer.php

index 03beed7cce16293590bf0013a41ea95dadb35d20..25e52e66f39e98f69910ec30b077dc55b3c79f23 100644 (file)
@@ -6,6 +6,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;
@@ -106,6 +107,22 @@ class ExceptionSerializer {
                Key::class => [
                        '__construct'
                ],
+               Client::class => [
+                       'request',
+                       'delete',
+                       'deleteAsync',
+                       'get',
+                       'getAsync',
+                       'head',
+                       'headAsync',
+                       'options',
+                       'optionsAsync',
+                       'patch',
+                       'post',
+                       'postAsync',
+                       'put',
+                       'putAsync',
+               ],
                \Redis::class => [
                        'auth'
                ],
@@ -196,13 +213,13 @@ class ExceptionSerializer {
 
        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;
        }