mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-29 17:56:44 +03:00
Bugfix ContactsSync
This commit is contained in:
parent
17932f2905
commit
98aff451f5
2 changed files with 3 additions and 2 deletions
|
|
@ -33,6 +33,7 @@
|
|||
td + td {
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
a {
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ trait Contacts
|
|||
|
||||
public function setContactsSyncData(\RainLoop\Model\Account $oAccount, array $aData) : bool
|
||||
{
|
||||
$oMainAccount = $this->getAccountFromToken();
|
||||
$oMainAccount = $this->getMainAccountFromToken();
|
||||
if ($aData['Password']) {
|
||||
$aData['Password'] = \SnappyMail\Crypt::EncryptToJSON($aData['Password'], $oMainAccount->CryptKey());
|
||||
}
|
||||
|
|
@ -264,7 +264,7 @@ trait Contacts
|
|||
$aData = \json_decode($sData);
|
||||
if ($aData) {
|
||||
if ($aData['Password']) {
|
||||
$oMainAccount = $this->getAccountFromToken();
|
||||
$oMainAccount = $this->getMainAccountFromToken();
|
||||
// Verify oAccount password hasn't changed so that Password can be decrypted
|
||||
if ($aData['PasswordHMAC'] !== \hash_hmac('sha1', $aData['Password'], $oMainAccount->CryptKey())) {
|
||||
// Failed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue