diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Config/AbstractConfig.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Config/AbstractConfig.php index 0e4ed05c2..483c165db 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Config/AbstractConfig.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Config/AbstractConfig.php @@ -91,9 +91,11 @@ abstract class AbstractConfig implements \JsonSerializable public function getDecrypted(string $sSection, string $sName, $mDefault = null) { // $salt = \basename($this->sFile) not possible due to RainLoop\Plugins\Property - return isset($this->aData[$sSection][$sName][0]) - ? \SnappyMail\Crypt::DecryptFromJSON($this->aData[$sSection][$sName][0], \APP_SALT) - : $mDefault; + if (!empty($this->aData[$sSection][$sName][0])) try { + return \SnappyMail\Crypt::DecryptFromJSON($this->aData[$sSection][$sName][0], \APP_SALT); + } catch (\Throwable $e) { + } + return $mDefault; } public function setEncrypted(string $sSectionKey, string $sParamKey, $mParamValue) : void diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Plugins/Property.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Plugins/Property.php index 62e2bdb12..8a6504ff4 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Plugins/Property.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Plugins/Property.php @@ -187,9 +187,14 @@ class Property implements \JsonSerializable #[\ReturnTypeWillChange] public function jsonSerialize() { + $mValue = $this->mValue; + if ($this->encrypted && $mValue) try { + $mValue = \SnappyMail\Crypt::DecryptFromJSON($mValue, \APP_SALT); + } catch (\Throwable $e) { + } return array( '@Object' => 'Object/PluginProperty', - 'value' => $this->encrypted ? \SnappyMail\Crypt::DecryptFromJSON($this->mValue, \APP_SALT) : $this->mValue, + 'value' => $mValue, 'placeholder' => $this->sPlaceholder, 'name' => $this->sName, 'type' => $this->iType,