Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(logger): Remove more parameters of other methods #48603

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading