mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 11:09:20 +03:00
Use Actions()->decodeRawKey()
This commit is contained in:
parent
3819311a6d
commit
9a4da9d7f0
2 changed files with 3 additions and 6 deletions
|
|
@ -1087,7 +1087,7 @@ class Actions
|
|||
return \MailSo\Base\Utils::UrlSafeBase64Encode(\json_encode($aValues));
|
||||
}
|
||||
|
||||
protected function decodeRawKey(string $sRawKey): array
|
||||
public function decodeRawKey(string $sRawKey): array
|
||||
{
|
||||
return empty($sRawKey) ? []
|
||||
: (\json_decode(\MailSo\Base\Utils::UrlSafeBase64Decode($sRawKey), true) ?: []);
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ trait Messages
|
|||
// throw new ClientException(Notifications::CantGetMessageList);
|
||||
$oParams = new \MailSo\Mail\MessageListParams;
|
||||
|
||||
$sRawKey = $this->GetActionParam('RawKey', '');
|
||||
$aValues = $sRawKey ? \json_decode(\MailSo\Base\Utils::UrlSafeBase64Decode($sRawKey), true) : null;
|
||||
$aValues = $this->decodeRawKey($this->GetActionParam('RawKey', ''));
|
||||
$sHash = '';
|
||||
if ($aValues && 6 < \count($aValues)) {
|
||||
// GET
|
||||
|
|
@ -404,9 +403,7 @@ trait Messages
|
|||
*/
|
||||
public function DoMessage() : array
|
||||
{
|
||||
$sRawKey = (string) $this->GetActionParam('RawKey', '');
|
||||
|
||||
$aValues = \json_decode(\MailSo\Base\Utils::UrlSafeBase64Decode($sRawKey), true);
|
||||
$aValues = $this->decodeRawKey((string) $this->GetActionParam('RawKey', ''));
|
||||
if ($aValues && 2 <= \count($aValues)) {
|
||||
$sFolder = (string) $aValues[0];
|
||||
$iUid = (int) $aValues[1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue