From 987315fb6500817553d8ae732320ea1d9e66c17f Mon Sep 17 00:00:00 2001 From: djmaze Date: Wed, 8 Dec 2021 23:32:07 +0100 Subject: [PATCH] Bugfix: fetching messagelist sometimes failed --- .../v/0.0.0/app/libraries/RainLoop/Actions/Messages.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Messages.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Messages.php index 6a2c746cc..4268a0a8f 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Messages.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Messages.php @@ -20,7 +20,7 @@ trait Messages $sRawKey = $this->GetActionParam('RawKey', ''); $aValues = \json_decode(\MailSo\Base\Utils::UrlSafeBase64Decode($sRawKey), true); - if ($aValues && 7 < \count($aValues)) + if ($aValues && 6 < \count($aValues)) { $this->verifyCacheByKey($sRawKey); @@ -510,7 +510,7 @@ trait Messages unset($oException); } - return $this->DefaultResponse(__FUNCTION__, '' === $sHash ? false : array($sFolder, $sHash)); + return $this->DefaultResponse(__FUNCTION__, $sHash ? array($sFolder, $sHash) : false); } /** @@ -574,7 +574,7 @@ trait Messages unset($oException); } - return $this->DefaultResponse(__FUNCTION__, '' === $sHash ? false : array($sFromFolder, $sHash)); + return $this->DefaultResponse(__FUNCTION__, $sHash ? array($sFromFolder, $sHash) : false); } /** @@ -602,8 +602,7 @@ trait Messages throw new ClientException(Notifications::CantCopyMessage, $oException); } - return $this->DefaultResponse(__FUNCTION__, - '' === $sHash ? false : array($sFromFolder, $sHash)); + return $this->DefaultResponse(__FUNCTION__, $sHash ? array($sFromFolder, $sHash) : false); } public function DoMessageUploadAttachments() : array