summaryrefslogtreecommitdiffstats
path: root/lib/private/Log
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2022-06-16 13:30:52 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2022-06-16 18:36:58 +0200
commit891c10d09da333e6af172bacd0c28540fd7a7032 (patch)
tree93e3093f9cffe1dac18bbb43e83fa17dd31fde22 /lib/private/Log
parent09a5947a6dbfafc90ca343a5f48c192d29bd9924 (diff)
downloadnextcloud-server-891c10d09da333e6af172bacd0c28540fd7a7032.tar.gz
nextcloud-server-891c10d09da333e6af172bacd0c28540fd7a7032.zip
fix overwriting original vars when logging
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private/Log')
-rw-r--r--lib/private/Log/ExceptionSerializer.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/Log/ExceptionSerializer.php b/lib/private/Log/ExceptionSerializer.php
index dab134b26a4..a792f966eda 100644
--- a/lib/private/Log/ExceptionSerializer.php
+++ b/lib/private/Log/ExceptionSerializer.php
@@ -208,14 +208,16 @@ class ExceptionSerializer {
}
private function removeValuesFromArgs($args, $values) {
- foreach ($args as &$arg) {
+ $workArgs = [];
+ foreach ($args as $arg) {
if (in_array($arg, $values, true)) {
$arg = '*** sensitive parameter replaced ***';
} elseif (is_array($arg)) {
$arg = $this->removeValuesFromArgs($arg, $values);
}
+ $workArgs[] = $arg;
}
- return $args;
+ return $workArgs;
}
private function encodeTrace($trace) {