mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +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 {
|
td + td {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,7 @@ trait Contacts
|
||||||
|
|
||||||
public function setContactsSyncData(\RainLoop\Model\Account $oAccount, array $aData) : bool
|
public function setContactsSyncData(\RainLoop\Model\Account $oAccount, array $aData) : bool
|
||||||
{
|
{
|
||||||
$oMainAccount = $this->getAccountFromToken();
|
$oMainAccount = $this->getMainAccountFromToken();
|
||||||
if ($aData['Password']) {
|
if ($aData['Password']) {
|
||||||
$aData['Password'] = \SnappyMail\Crypt::EncryptToJSON($aData['Password'], $oMainAccount->CryptKey());
|
$aData['Password'] = \SnappyMail\Crypt::EncryptToJSON($aData['Password'], $oMainAccount->CryptKey());
|
||||||
}
|
}
|
||||||
|
|
@ -264,7 +264,7 @@ trait Contacts
|
||||||
$aData = \json_decode($sData);
|
$aData = \json_decode($sData);
|
||||||
if ($aData) {
|
if ($aData) {
|
||||||
if ($aData['Password']) {
|
if ($aData['Password']) {
|
||||||
$oMainAccount = $this->getAccountFromToken();
|
$oMainAccount = $this->getMainAccountFromToken();
|
||||||
// Verify oAccount password hasn't changed so that Password can be decrypted
|
// Verify oAccount password hasn't changed so that Password can be decrypted
|
||||||
if ($aData['PasswordHMAC'] !== \hash_hmac('sha1', $aData['Password'], $oMainAccount->CryptKey())) {
|
if ($aData['PasswordHMAC'] !== \hash_hmac('sha1', $aData['Password'], $oMainAccount->CryptKey())) {
|
||||||
// Failed
|
// Failed
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue