Fix smime signed messages contain text/calender no longer are processed as event

This commit is contained in:
hadi 2023-04-27 13:54:40 +02:00
parent 296d6c66b9
commit 6be743628f

View File

@ -3308,11 +3308,11 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
$bodyParts = $this->mail_bo->getMessageBody($uid, ($htmlOptions?$htmlOptions:''), $partID, $structure, false, $mailbox, $calendar_part); $bodyParts = $this->mail_bo->getMessageBody($uid, ($htmlOptions?$htmlOptions:''), $partID, $structure, false, $mailbox, $calendar_part);
// for meeting requests (multipart alternative with text/calendar part) let calendar render it // for meeting requests (multipart alternative with text/calendar part) let calendar render it
if ($calendar_part && isset($GLOBALS['egw_info']['user']['apps']['calendar']) && empty($smime)) if ($calendar_part && isset($GLOBALS['egw_info']['user']['apps']['calendar']))
{ {
$charset = $calendar_part->getContentTypeParameter('charset'); $charset = $calendar_part->getContentTypeParameter('charset');
// Do not try to fetch raw part content if it's smime signed message // Do not try to fetch raw part content if it's smime signed message
$this->mail_bo->fetchPartContents($uid, $calendar_part); if (empty($smime)) $this->mail_bo->fetchPartContents($uid, $calendar_part);
$headers = $this->mail_bo->getHeaders($mailbox, 0, 1, '', false, null, $uid); $headers = $this->mail_bo->getHeaders($mailbox, 0, 1, '', false, null, $uid);
Api\Cache::setSession('calendar', 'ical', array( Api\Cache::setSession('calendar', 'ical', array(
'charset' => $charset ?: 'utf-8', 'charset' => $charset ?: 'utf-8',