diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php index 887e72cff..53e77ff5b 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php @@ -50,8 +50,11 @@ class Application extends \RainLoop\Config\AbstractConfig if (!$sCipher || !\SnappyMail\Crypt::cipherSupported($sCipher)) { $sCipher && \SnappyMail\Log::warning('Crypt', "OpenSSL no support for cipher '{$sCipher}'"); $aCiphers = \SnappyMail\Crypt::listCiphers(); - $this->Set('security', 'encrypt_cipher', $aCiphers[\array_rand($aCiphers)]); - $this->Save(); + $sCipher2 = $aCiphers ? $aCiphers[\array_rand($aCiphers)] : ''; + if ($sCipher !== $sCipher2) { + $this->Set('security', 'encrypt_cipher', $sCipher2); + $this->Save(); + } } return $bResult;