[Web] Skip passwords in API log

This commit is contained in:
andre.peters
2018-01-16 22:09:25 +01:00
parent 0019502069
commit 7701660119
2 changed files with 7 additions and 2 deletions

View File

@@ -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 . "'";