mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Bugfix: additional account switch failed due to the old ParentEmail
This commit is contained in:
parent
d4e77a97f5
commit
8aad63fcf8
3 changed files with 2 additions and 9 deletions
|
|
@ -193,7 +193,7 @@ abstract class Account implements \JsonSerializable
|
||||||
array $aAccountHash,
|
array $aAccountHash,
|
||||||
bool $bThrowExceptionOnFalse = false): ?self
|
bool $bThrowExceptionOnFalse = false): ?self
|
||||||
{
|
{
|
||||||
if (!empty($aAccountHash[0]) && 'account' === $aAccountHash[0] && 7 === \count($aAccountHash)) {
|
if (!empty($aAccountHash[0]) && 'account' === $aAccountHash[0] && 7 <= \count($aAccountHash)) {
|
||||||
$oAccount = static::NewInstanceByLogin(
|
$oAccount = static::NewInstanceByLogin(
|
||||||
$oActions,
|
$oActions,
|
||||||
$aAccountHash[1] ?: '',
|
$aAccountHash[1] ?: '',
|
||||||
|
|
|
||||||
|
|
@ -17,13 +17,6 @@ class AdditionalAccount extends Account
|
||||||
return \md5(parent::Hash() . $this->ParentEmail());
|
return \md5(parent::Hash() . $this->ParentEmail());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function jsonSerialize()
|
|
||||||
{
|
|
||||||
$aData = parent::jsonSerialize();
|
|
||||||
$aData[] = ''; // was ParentEmail
|
|
||||||
return $aData;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function asTokenArray(MainAccount $oMainAccount) : array
|
public function asTokenArray(MainAccount $oMainAccount) : array
|
||||||
{
|
{
|
||||||
$sHash = $oMainAccount->CryptKey();
|
$sHash = $oMainAccount->CryptKey();
|
||||||
|
|
|
||||||
|
|
@ -192,6 +192,6 @@ abstract class Crypt
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
\SnappyMail\Crypt::setCipher(\RainLoop\API::Config()->Get('security', 'encrypt_cipher', 'aes-256-cbc-hmac-sha1'))
|
\SnappyMail\Crypt::setCipher(\RainLoop\Api::Config()->Get('security', 'encrypt_cipher', 'aes-256-cbc-hmac-sha1'))
|
||||||
|| \SnappyMail\Crypt::setCipher('aes-256-cbc-hmac-sha1')
|
|| \SnappyMail\Crypt::setCipher('aes-256-cbc-hmac-sha1')
|
||||||
|| \SnappyMail\Crypt::setCipher('aes-256-xts');
|
|| \SnappyMail\Crypt::setCipher('aes-256-xts');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue