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 <coding@schilljs.com>
  • Loading branch information
nickvergessen authored and backportbot[bot] committed Oct 21, 2024
1 parent 5af07d0 commit 52382e7
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 @@ -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;
Expand Down Expand Up @@ -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'
],
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 52382e7

Please sign in to comment.