Skip to content

Commit

Permalink
fix(logger): Remove more parameters of other methods
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Oct 7, 2024
1 parent 5bd1873 commit a90921e
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions lib/private/Log/ExceptionSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -106,6 +107,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'
],
Expand Down Expand Up @@ -196,13 +213,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;
}
Expand Down

0 comments on commit a90921e

Please sign in to comment.