an already subscribed folder (#1115409).
- Added blank.png for missing image support.
- Use the proper attachment filenames in case of forwarding a message.
+ - Fix for #855320 where Outlook Express was creating CID: based URLs,
+ but not assigning a content-id to the attachment. This is a bug in
+ Outlook Express and is non-RFC compliant behaviour.
Version 1.5.0
// if (sq_check_save_extension($message->entities[$i])) {
return $message->entities[$i]->entity_id;
// }
+ } elseif (!empty($message->entities[$i]->header->parameters['name'])) {
+ /**
+ * This is part of a fix for Outlook Express 6.x generating
+ * cid URLs without creating content-id headers
+ * @@JA - 20050207
+ */
+ if (strcasecmp($message->entities[$i]->header->parameters['name'], $id) == 0) {
+ return $message->entities[$i]->entity_id;
+ }
}
}
}
/* in case of non-save cid links $httpurl should be replaced by a sort of
unsave link image */
$httpurl = '';
- if ($linkurl) {
+
+ /**
+ * This is part of a fix for Outlook Express 6.x generating
+ * cid URLs without creating content-id headers. These images are
+ * not part of the multipart/related html mail. The html contains
+ * <img src="cid:{some_id}/image_filename.ext"> references to
+ * attached images with as goal to render them inline although
+ * the attachment disposition property is not inline.
+ **/
+
+ if (empty($linkurl)) {
+ if (preg_match('/{.*}\//', $cidurl)) {
+ $cidurl = preg_replace('/{.*}\//','', $cidurl);
+ if (!empty($cidurl)) {
+ $linkurl = find_ent_id($cidurl, $message);
+ }
+ }
+ }
+
+ if (!empty($linkurl)) {
$httpurl = $quotchar . SM_PATH . 'src/download.php?absolute_dl=true&' .
- "passed_id=$id&mailbox=" . urlencode($mailbox) .
- '&ent_id=' . $linkurl . $quotchar;
+ "passed_id=$id&mailbox=" . urlencode($mailbox) .
+ '&ent_id=' . $linkurl . $quotchar;
+ } else {
+ /**
+ * If we couldn't generate a proper img url, drop in a blank image
+ * instead of sending back empty, otherwise it causes unusual behaviour
+ */
+ $httpurl = $quotechar . SM_PATH . 'images/blank.png';
}
+
return $httpurl;
}
} // end fn SendDownloadHeaders
-?>
\ No newline at end of file
+?>