mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2024-12-09 08:50:05 +08:00
[Web] Skip passwords in API log
This commit is contained in:
parent
0019502069
commit
7701660119
@ -40,7 +40,7 @@ $tfa_data = get_tfa();
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-3 col-sm-9">
|
||||
<button class="btn btn-default" id="edit_selected" data-id="admin" data-item="null" data-api-url='edit/self' data-api-attr='{}' href="#"><span class="glyphicon glyphicon-check"></span> <?=$lang['admin']['save'];?></button>
|
||||
<button class="btn btn-default" id="edit_selected" data-id="admin" data-item="admin" data-api-url='edit/self' data-api-attr='{}' href="#"><span class="glyphicon glyphicon-check"></span> <?=$lang['admin']['save'];?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -522,7 +522,7 @@ $tfa_data = get_tfa();
|
||||
<label for="help_text"><?=$lang['admin']['help_text'];?>:</label>
|
||||
<textarea class="form-control" id="help_text" name="help_text" rows="7"><?=$ui_texts['help_text'];?></textarea>
|
||||
</div>
|
||||
<button class="btn btn-success" id="edit_selected" data-item="null" data-id="uitexts" data-api-url='edit/ui_texts' data-api-attr='{}' href="#"><span class="glyphicon glyphicon-check"></span> <?=$lang['admin']['save'];?></button>
|
||||
<button class="btn btn-success" id="edit_selected" data-item="ui" data-id="uitexts" data-api-url='edit/ui_texts' data-api-attr='{}' href="#"><span class="glyphicon glyphicon-check"></span> <?=$lang['admin']['save'];?></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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 . "'";
|
||||
|
Loading…
Reference in New Issue
Block a user