diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-11-24 17:08:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-24 17:08:25 +0100 |
commit | 8f14ffd7345b7d11d2bdf5e920a53f7880dc81b7 (patch) | |
tree | 579032968ad75ecb65687494c6691119f5f476db | |
parent | cb69accdc5d86ea72e7593ffd886cea1e498af54 (diff) | |
parent | df0eeb8089a9a8c52f485b8028d06770169708a6 (diff) | |
download | nextcloud-server-8f14ffd7345b7d11d2bdf5e920a53f7880dc81b7.tar.gz nextcloud-server-8f14ffd7345b7d11d2bdf5e920a53f7880dc81b7.zip |
Merge pull request #2306 from nextcloud/dont-log-user-password
Don't log the user password in case something goes wrong
-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 ); } |