From 77016601192f8f1c1f7d04204fc54863dc71da64 Mon Sep 17 00:00:00 2001 From: "andre.peters" Date: Tue, 16 Jan 2018 22:09:25 +0100 Subject: [PATCH] [Web] Skip passwords in API log --- data/web/admin.php | 4 ++-- data/web/json_api.php | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/data/web/admin.php b/data/web/admin.php index 660b9051..292c996c 100644 --- a/data/web/admin.php +++ b/data/web/admin.php @@ -40,7 +40,7 @@ $tfa_data = get_tfa();
- +
@@ -522,7 +522,7 @@ $tfa_data = get_tfa(); - + diff --git a/data/web/json_api.php b/data/web/json_api.php index 3bcb2ac4..cb0e5784 100644 --- a/data/web/json_api.php +++ b/data/web/json_api.php @@ -25,6 +25,11 @@ function api_log($postarray) { } if ($value = json_decode($value, true)) { unset($value["csrf_token"]); + foreach ($value as $key => &$val) { + if(preg_match("/pass/i", $key)) { + $val = '********'; + } + } $value = json_encode($value); } $data_var[] = $data . "='" . $value . "'";