Browse Source
Don't log the user password in case something goes wrong
Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/2306/head
Joas Schilling
9 years ago
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
2 changed files with
21 additions and
9 deletions
-
apps/admin_audit/lib/actions/action.php
-
apps/admin_audit/lib/actions/auth.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; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -34,7 +34,8 @@ class Auth extends Action { |
|
|
|
$params, |
|
|
|
[ |
|
|
|
'uid', |
|
|
|
] |
|
|
|
], |
|
|
|
true |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
@ -44,7 +45,8 @@ class Auth extends Action { |
|
|
|
$params, |
|
|
|
[ |
|
|
|
'uid', |
|
|
|
] |
|
|
|
], |
|
|
|
true |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
|