Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2022-06-16 14:30:52 +0300
committerArthur Schiwon <blizzz@arthur-schiwon.de>2022-06-17 15:58:01 +0300
commitbf5487482d545e04359ee7f97fa375bd77bb3078 (patch)
tree6dc47f134c07b524154e47c4d3d1a2a36e7b55af /lib/private
parent6f1b612770560b0afc49d99a40a005934e4cfbee (diff)
fix overwriting original vars when logging
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private')
-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 fb63ddf0a0e..fc9e4cc1bd0 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) {