mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Bugfix: ETag should use account not ImapClient as switching accounts could generate same hash
This commit is contained in:
parent
e2ed87a1ab
commit
402de0d569
3 changed files with 4 additions and 4 deletions
|
|
@ -163,7 +163,7 @@ class Folder implements \JsonSerializable
|
|||
'totalEmails' => (int) $this->MESSAGES,
|
||||
'unreadEmails' => (int) $this->UNSEEN,
|
||||
'uidNext' => (int) $this->UIDNEXT,
|
||||
// 'etag' => $this->ETag($this->ImapClient()->Hash())
|
||||
// 'etag' => $this->ETag($this->getAccountFromToken()->IncLogin())
|
||||
);
|
||||
}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ trait Messages
|
|||
// $oInfo = $this->MailClient()->FolderHash($oParams->sFolderName);
|
||||
$oInfo = $this->ImapClient()->FolderStatusAndSelect($oParams->sFolderName);
|
||||
$aRequestHash = \explode('-', $sHash);
|
||||
$sFolderHash = $oInfo->getETag($this->ImapClient()->Hash());
|
||||
$sFolderHash = $oInfo->getETag($this->getAccountFromToken()->IncLogin());
|
||||
$sHash = $oParams->hash() . '-' . $sFolderHash;
|
||||
if ($aRequestHash[1] == $sFolderHash) {
|
||||
$this->verifyCacheByKey($sHash);
|
||||
|
|
@ -429,7 +429,7 @@ trait Messages
|
|||
}
|
||||
|
||||
if ($oMessage) {
|
||||
$ETag = $oMessage->ETag($this->ImapClient()->Hash());
|
||||
$ETag = $oMessage->ETag($this->getAccountFromToken()->IncLogin());
|
||||
$this->verifyCacheByKey($ETag);
|
||||
$this->Plugins()->RunHook('filter.result-message', array($oMessage));
|
||||
$this->cacheByKey($ETag);
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ trait Response
|
|||
if ($mResponse instanceof \MailSo\Imap\Folder) {
|
||||
$aResult = $mResponse->jsonSerialize();
|
||||
|
||||
$sHash = $mResponse->ETag($this->ImapClient()->Hash());
|
||||
$sHash = $mResponse->ETag($this->getAccountFromToken()->IncLogin());
|
||||
if ($sHash) {
|
||||
$aResult['etag'] = $sHash;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue