mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 08:57:03 +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');
|
$this->oActions->logWrite('Action: '.$sMethodName, \LOG_INFO, 'JSON');
|
||||||
|
|
||||||
$aPost = $_POST ?? null;
|
if ($_POST) {
|
||||||
if ($aPost) {
|
$this->oActions->SetActionParams($_POST, $sMethodName);
|
||||||
$this->oActions->SetActionParams($aPost, $sMethodName);
|
foreach ($_POST as $key => $value) {
|
||||||
foreach ($aPost as $key => $value) {
|
// password & passphrase
|
||||||
if (false !== \stripos($key, 'Password')) {
|
if (false !== \stripos($key, 'pass')) {
|
||||||
$aPost[$key] = '*******';
|
// $_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()) {
|
} else if (3 < \count($this->aPaths) && $this->oHttp->IsGet()) {
|
||||||
$this->oActions->SetActionParams(array(
|
$this->oActions->SetActionParams(array(
|
||||||
'RawKey' => empty($this->aPaths[3]) ? '' : $this->aPaths[3]
|
'RawKey' => empty($this->aPaths[3]) ? '' : $this->aPaths[3]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue