From b0e4801d425921d505c0719ade47293a294ab6f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20FINKBEINER?= Date: Fri, 24 Oct 2025 09:45:52 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Updates=20regex=20to=20match=20t?= =?UTF-8?q?he=20mail=20content=20id=20properly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Example of content-type not properly manage Content-Type: multipart/related; boundary=_004_PARP264MB67443FFE96E5ACB5C06D04C3BEF2APARP264MB6744FRAP_; type="multipart/alternative" --- classes/rawemailmessage.class.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/rawemailmessage.class.inc.php b/classes/rawemailmessage.class.inc.php index f47545c..ac05541 100644 --- a/classes/rawemailmessage.class.inc.php +++ b/classes/rawemailmessage.class.inc.php @@ -498,7 +498,7 @@ protected function ExtractParts($aHeaders, $aBodyLines) $aParsedParts = array(); $sContentType = isset($aHeaders['content-type']) ? $aHeaders['content-type'] : ''; - if (($sContentType != '') && preg_match('/multipart(.*);.*?boundary="?([^"]+)"?/i', $sContentType, $aMatches)) + if (($sContentType != '') && preg_match('/multipart(.*);.*?boundary="?([^";]+)"?/i', $sContentType, $aMatches)) { $sBoundary = $aMatches[2]; if (empty($sBoundary))