Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2694891
D25565.1734809242.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25565.1734809242.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
@@ -308,10 +308,10 @@
* @param $part Array
*/
private function getPartHeaders($part) {
- if (isset($part['headers'])) {
+ if (isset($part['headers']) && $part['headers']) {
return $part['headers'];
}
- return false;
+ throw new Exception('MimeMailParser::getHeaders() could not parse any email headers.');
}
/**
diff --git a/scripts/mail/mail_handler.php b/scripts/mail/mail_handler.php
--- a/scripts/mail/mail_handler.php
+++ b/scripts/mail/mail_handler.php
@@ -55,7 +55,9 @@
}
$headers = $parser->getHeaders();
-$headers['subject'] = phutil_decode_mime_header($headers['subject']);
+if (array_key_exists('subject', $headers)) {
+ $headers['subject'] = phutil_decode_mime_header($headers['subject']);
+}
$headers['from'] = phutil_decode_mime_header($headers['from']);
if ($args->getArg('process-duplicates')) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 19:27 (16 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1021115
Default Alt Text
D25565.1734809242.diff (1 KB)
Attached To
Mode
D25565: Make incoming mail handling more robust / correct
Attached
Detach File
Event Timeline
Log In to Comment