From ca08437967e5ecbd41ae74de38cede0de1e6047c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 28 Mar 2024 11:10:39 +0100 Subject: fix(logger): Make the handling of SensitiveParameters consistent Signed-off-by: Joas Schilling --- lib/private/Log/ExceptionSerializer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/Log/ExceptionSerializer.php b/lib/private/Log/ExceptionSerializer.php index 8b895bcb6be..da4c7224aa4 100644 --- a/lib/private/Log/ExceptionSerializer.php +++ b/lib/private/Log/ExceptionSerializer.php @@ -220,7 +220,9 @@ class ExceptionSerializer { private function removeValuesFromArgs($args, $values): array { $workArgs = []; foreach ($args as $arg) { - if (in_array($arg, $values, true)) { + if (isset($arg['__class__']) && $arg['__class__'] === \SensitiveParameterValue::class) { + $arg = self::SENSITIVE_VALUE_PLACEHOLDER; + } elseif (in_array($arg, $values, true)) { $arg = self::SENSITIVE_VALUE_PLACEHOLDER; } elseif (is_array($arg)) { $arg = $this->removeValuesFromArgs($arg, $values); -- cgit v1.2.3