Improved GnuPG error handling

This commit is contained in:
the-djmaze 2024-02-27 18:45:25 +01:00
parent c73e3637a3
commit 3d176d4e4f
9 changed files with 110 additions and 56 deletions

View file

@ -114,14 +114,15 @@ class ServiceActions
if ($_POST) {
$this->oActions->SetActionParams($_POST, $sMethodName);
foreach ($_POST as $key => $value) {
$aPost = $_POST;
foreach ($aPost as $key => $value) {
// password & passphrase
if (false !== \stripos($key, 'pass')) {
// $_POST[$key] = '*******';
$this->oActions->logMask($value);
$aPost[$key] = '*******';
// $this->oActions->logMask($value);
}
}
$this->oActions->logWrite(Utils::jsonEncode($_POST), \LOG_INFO, 'POST');
$this->oActions->logWrite(Utils::jsonEncode($aPost), \LOG_INFO, 'POST');
} else if (3 < \count($this->aPaths) && $this->oHttp->IsGet()) {
$this->oActions->SetActionParams(array(
'RawKey' => empty($this->aPaths[3]) ? '' : $this->aPaths[3]