Page MenuHomePhabricator

D12494.diff
No OneTemporary

D12494.diff

diff --git a/externals/mimemailparser/MimeMailParser.class.php b/externals/mimemailparser/MimeMailParser.class.php
--- a/externals/mimemailparser/MimeMailParser.class.php
+++ b/externals/mimemailparser/MimeMailParser.class.php
@@ -111,6 +111,14 @@
* @param $data String
*/
public function setText($data) {
+ // NOTE: This has been modified for Phabricator. If the input data does not
+ // end in a newline, Mailparse fails to include the last line in the mail
+ // body. This happens somewhere deep, deep inside the mailparse extension,
+ // so adding a newline here seems like the most straightforward fix.
+ if (!preg_match('/\n\z/', $data)) {
+ $data = $data."\n";
+ }
+
$this->resource = mailparse_msg_create();
// does not parse incrementally, fast memory hog might explode
mailparse_msg_parse($this->resource, $data);

File Metadata

Mime Type
text/plain
Expires
Thu, May 9, 9:12 AM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6274517
Default Alt Text
D12494.diff (865 B)

Event Timeline