Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-11-24 15:58:03 +0300
committerJoas Schilling <coding@schilljs.com>2016-11-24 15:58:03 +0300
commitdf0eeb8089a9a8c52f485b8028d06770169708a6 (patch)
tree09fc01854011dd2660c8f66249ff7eff5edc8910 /apps/admin_audit/lib
parente3489d92fd820c1a94251d007e0189c8588eaee2 (diff)
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/lib')
-rw-r--r--apps/admin_audit/lib/actions/action.php24
-rw-r--r--apps/admin_audit/lib/actions/auth.php6
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
);
}