diff options
author | Joas Schilling <coding@schilljs.com> | 2016-11-24 13:58:03 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-11-24 13:58:03 +0100 |
commit | df0eeb8089a9a8c52f485b8028d06770169708a6 (patch) | |
tree | 09fc01854011dd2660c8f66249ff7eff5edc8910 /apps/admin_audit | |
parent | e3489d92fd820c1a94251d007e0189c8588eaee2 (diff) | |
download | nextcloud-server-df0eeb8089a9a8c52f485b8028d06770169708a6.tar.gz nextcloud-server-df0eeb8089a9a8c52f485b8028d06770169708a6.zip |
Don't log the user password in case something goes wrong
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/admin_audit')
-rw-r--r-- | apps/admin_audit/lib/actions/action.php | 24 | ||||
-rw-r--r-- | apps/admin_audit/lib/actions/auth.php | 6 |
2 files changed, 21 insertions, 9 deletions
diff --git a/apps/admin_audit/lib/actions/action.php b/apps/admin_audit/lib/actions/action.php index 0525910f8dd..2d036675869 100644 --- a/apps/admin_audit/lib/actions/action.php +++ b/apps/admin_audit/lib/actions/action.php @@ -41,18 +41,28 @@ class Action { * @param string $text * @param array $params * @param array $elements + * @param bool $obfuscateParameters */ public function log($text, array $params, - array $elements) { + array $elements, + $obfuscateParameters = false) { foreach($elements as $element) { if(!isset($params[$element])) { - $this->logger->critical( - sprintf( - '$params["'.$element.'"] was missing. Transferred value: %s', - print_r($params, true) - ) - ); + if ($obfuscateParameters) { + $this->logger->critical( + '$params["'.$element.'"] was missing.', + ['app' => 'admin_audit'] + ); + } else { + $this->logger->critical( + sprintf( + '$params["'.$element.'"] was missing. Transferred value: %s', + print_r($params, true) + ), + ['app' => 'admin_audit'] + ); + } return; } } diff --git a/apps/admin_audit/lib/actions/auth.php b/apps/admin_audit/lib/actions/auth.php index c035cf785fe..405ea5e6d22 100644 --- a/apps/admin_audit/lib/actions/auth.php +++ b/apps/admin_audit/lib/actions/auth.php @@ -34,7 +34,8 @@ class Auth extends Action { $params, [ 'uid', - ] + ], + true ); } @@ -44,7 +45,8 @@ class Auth extends Action { $params, [ 'uid', - ] + ], + true ); } |