|
|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2020-10-10 16:35 UTC] [email protected]
-Assigned To:
+Assigned To: cmb
[2020-10-12 09:13 UTC] [email protected]
-Summary: imap_mail_compose() segfaults on multipart w/o part
type
+Summary: imap_mail_compose() does not validate types/encodings
[2020-10-12 09:13 UTC] [email protected]
[2020-10-12 12:10 UTC] [email protected]
[2020-10-12 14:32 UTC] [email protected]
[2020-10-12 14:32 UTC] [email protected]
-Status: Assigned
+Status: Closed
|
|||||||||||||||||||||||||||
|
All rights reserved. |
Last updated: Wed Jan 28 03:00:01 2026 UTC |
Description: ------------ If imap_mail_compose() is used to create a multipart MIME message without specifying explicit types for the individual parts, that leads to a segfault. Since the type for the first body defaults to TYPETEXT, I would expect the individual parts to default to TYPETEXT as well. Test script: --------------- <?php $envelope = [ 'from' => '[email protected]', 'to' => '[email protected]', 'subject' => 'hello', ]; $body = [[ 'type' => TYPEMULTIPART, ], [ 'contents.data' => 'yada yada', ]]; echo imap_mail_compose($envelope, $body); ?> Expected result: ---------------- From: [email protected] Subject: hello To: [email protected] MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="321-1709-1602347443=:9960" --321-1709-1602347443=:9960 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII yada yada --321-1709-1602347443=:9960-- Actual result: -------------- segfault