mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 00:47:04 +03:00
Resolve #1123
This commit is contained in:
parent
a043eaec81
commit
7b70117155
1 changed files with 5 additions and 2 deletions
|
|
@ -50,8 +50,11 @@ class Application extends \RainLoop\Config\AbstractConfig
|
||||||
if (!$sCipher || !\SnappyMail\Crypt::cipherSupported($sCipher)) {
|
if (!$sCipher || !\SnappyMail\Crypt::cipherSupported($sCipher)) {
|
||||||
$sCipher && \SnappyMail\Log::warning('Crypt', "OpenSSL no support for cipher '{$sCipher}'");
|
$sCipher && \SnappyMail\Log::warning('Crypt', "OpenSSL no support for cipher '{$sCipher}'");
|
||||||
$aCiphers = \SnappyMail\Crypt::listCiphers();
|
$aCiphers = \SnappyMail\Crypt::listCiphers();
|
||||||
$this->Set('security', 'encrypt_cipher', $aCiphers[\array_rand($aCiphers)]);
|
$sCipher2 = $aCiphers ? $aCiphers[\array_rand($aCiphers)] : '';
|
||||||
$this->Save();
|
if ($sCipher !== $sCipher2) {
|
||||||
|
$this->Set('security', 'encrypt_cipher', $sCipher2);
|
||||||
|
$this->Save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $bResult;
|
return $bResult;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue