mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Mask all POST data that has a key which contains pass
This commit is contained in:
parent
28d8bec935
commit
275ad40346
1 changed files with 8 additions and 7 deletions
|
|
@ -112,15 +112,16 @@ class ServiceActions
|
|||
|
||||
$this->oActions->logWrite('Action: '.$sMethodName, \LOG_INFO, 'JSON');
|
||||
|
||||
$aPost = $_POST ?? null;
|
||||
if ($aPost) {
|
||||
$this->oActions->SetActionParams($aPost, $sMethodName);
|
||||
foreach ($aPost as $key => $value) {
|
||||
if (false !== \stripos($key, 'Password')) {
|
||||
$aPost[$key] = '*******';
|
||||
if ($_POST) {
|
||||
$this->oActions->SetActionParams($_POST, $sMethodName);
|
||||
foreach ($_POST as $key => $value) {
|
||||
// password & passphrase
|
||||
if (false !== \stripos($key, 'pass')) {
|
||||
// $_POST[$key] = '*******';
|
||||
$this->oActions->logMask($value);
|
||||
}
|
||||
}
|
||||
$this->oActions->logWrite(Utils::jsonEncode($aPost), \LOG_INFO, 'POST');
|
||||
$this->oActions->logWrite(Utils::jsonEncode($_POST), \LOG_INFO, 'POST');
|
||||
} else if (3 < \count($this->aPaths) && $this->oHttp->IsGet()) {
|
||||
$this->oActions->SetActionParams(array(
|
||||
'RawKey' => empty($this->aPaths[3]) ? '' : $this->aPaths[3]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue