Commit 69e911cf authored by Sebastian Kummer's avatar Sebastian Kummer

Revert "Merge pull request #69 in ZP/z-push from...

Revert "Merge pull request #69 in ZP/z-push from bugfix/ZP-656-warnings-for-signed-emails-in-sent to develop"

This reverts commit 28a8e536.
parent 04c47003
...@@ -795,13 +795,10 @@ class MAPIProvider { ...@@ -795,13 +795,10 @@ class MAPIProvider {
// OL 2013 doesn't show sender and subject for signed emails because the headers are missing // OL 2013 doesn't show sender and subject for signed emails because the headers are missing
if(isset($message->messageclass) && strpos($message->messageclass, "IPM.Note.SMIME.MultipartSigned") === 0 && if(isset($message->messageclass) && strpos($message->messageclass, "IPM.Note.SMIME.MultipartSigned") === 0 &&
isset($message->asbody->type) && $message->asbody->type == SYNC_BODYPREFERENCE_MIME) { isset($message->asbody->type) && $message->asbody->type == SYNC_BODYPREFERENCE_MIME) {
ZLog::Write(LOGLEVEL_DEBUG, "Attach the transport message headers to a signed message");
$transportHeaders = array(PR_TRANSPORT_MESSAGE_HEADERS_W); $transportHeaders = array(PR_TRANSPORT_MESSAGE_HEADERS_W);
$messageHeaders = $this->getProps($mapimessage, $transportHeaders); $messageHeaders = $this->getProps($mapimessage, $transportHeaders);
if (isset($messageHeaders[PR_TRANSPORT_MESSAGE_HEADERS]) && $messageHeaders[PR_TRANSPORT_MESSAGE_HEADERS]) { $message->asbody->data = $messageHeaders[PR_TRANSPORT_MESSAGE_HEADERS] ."\r\n\r\n" . $message->asbody->data;
ZLog::Write(LOGLEVEL_DEBUG, "Prepend the transport message headers to a signed message");
// the retrieved data already contains headers, so we just prepend the transport headers here
$message->asbody->data = $messageHeaders[PR_TRANSPORT_MESSAGE_HEADERS] . $message->asbody->data;
}
} }
return $message; return $message;
...@@ -2379,9 +2376,8 @@ class MAPIProvider { ...@@ -2379,9 +2376,8 @@ class MAPIProvider {
*/ */
private function imtoinet($mapimessage, &$message) { private function imtoinet($mapimessage, &$message) {
// if it is a signed message get a full attachment generated by ZCP // if it is a signed message get a full attachment generated by ZCP
$props = mapi_getprops($mapimessage, array(PR_MESSAGE_CLASS, PR_TRANSPORT_MESSAGE_HEADERS_W)); $props = mapi_getprops($mapimessage, array(PR_MESSAGE_CLASS));
if (isset($props[PR_MESSAGE_CLASS]) && $props[PR_MESSAGE_CLASS] && strpos(strtolower($props[PR_MESSAGE_CLASS]), 'multipartsigned') && if (isset($props[PR_MESSAGE_CLASS]) && $props[PR_MESSAGE_CLASS] && strpos(strtolower($props[PR_MESSAGE_CLASS]), 'multipartsigned')) {
isset($props[PR_TRANSPORT_MESSAGE_HEADERS]) && $props[PR_TRANSPORT_MESSAGE_HEADERS]) {
// find the required attachment // find the required attachment
$attachtable = mapi_message_getattachmenttable($mapimessage); $attachtable = mapi_message_getattachmenttable($mapimessage);
mapi_table_restrict($attachtable, MAPIUtils::GetSignedAttachmentRestriction()); mapi_table_restrict($attachtable, MAPIUtils::GetSignedAttachmentRestriction());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment