Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14329016
D12494.id29989.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
865 B
Referenced Files
None
Subscribers
None
D12494.id29989.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 3:09 PM (10 h, 14 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6907837
Default Alt Text
D12494.id29989.diff (865 B)
Attached To
Mode
D12494: Work around mailparse bug (?) with messages that have no terminal newline
Attached
Detach File
Event Timeline
Log In to Comment