From: Tim Düsterhus Date: Fri, 13 May 2022 10:06:03 +0000 (+0200) Subject: Add support for PHP 8.2's native SensitiveParameter attribute X-Git-Tag: 6.0.0_Alpha_1~1300^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3261ca2d240e05f89594b67ecfda7aa0d23ef566;p=GitHub%2FWoltLab%2FWCF.git Add support for PHP 8.2's native SensitiveParameter attribute --- diff --git a/wcfsetup/install.php b/wcfsetup/install.php index 2a70e62738..6df6a5eb94 100644 --- a/wcfsetup/install.php +++ b/wcfsetup/install.php @@ -50,7 +50,10 @@ function sanitizeStacktrace(\Throwable $e, bool $ignorePaths = false) { $isSensitive = false; if ( \method_exists($parameter, 'getAttributes') - && !empty($parameter->getAttributes(\wcf\SensitiveArgument::class)) + && ( + !empty($parameter->getAttributes(\wcf\SensitiveArgument::class)) + || !empty($parameter->getAttributes(\SensitiveParameter::class)) + ) ) { $isSensitive = true; } diff --git a/wcfsetup/install/files/lib/core.functions.php b/wcfsetup/install/files/lib/core.functions.php index 1338a093c6..0286c4a2b7 100644 --- a/wcfsetup/install/files/lib/core.functions.php +++ b/wcfsetup/install/files/lib/core.functions.php @@ -723,7 +723,10 @@ EXPLANATION; $isSensitive = false; if ( \method_exists($parameter, 'getAttributes') - && !empty($parameter->getAttributes(\wcf\SensitiveArgument::class)) + && ( + !empty($parameter->getAttributes(\wcf\SensitiveArgument::class)) + || !empty($parameter->getAttributes(\SensitiveParameter::class)) + ) ) { $isSensitive = true; }