[git] GpgOL - branch, master, updated. gpgol-2.0.6-10-g14d0e2d

by Andre Heinecke cvs at cvs.gnupg.org
Mon Feb 26 16:48:01 CET 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG extension for MS Outlook".

The branch, master has been updated
       via  14d0e2d9d1e0f058ee391363aeee67614d9a7734 (commit)
       via  7700f5da2744cc7aa718aaaeedc66618b4088bff (commit)
      from  dc2f7424d081c1de0b639b3ab52aaa8092077c27 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 14d0e2d9d1e0f058ee391363aeee67614d9a7734
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Mon Feb 26 16:45:51 2018 +0100

    Fix multipart/signed detection if ms-tnef wrapped
    
    * src/mapihelp.cpp (change_message_class_ipm_note_smime),
    (change_message_class_ipm_note_smime_multipartsigned): Handle tnef.
    
    --
    This fixes mutlipart/signed detection both when s/mime is enabled
    and when it's disabled. For these kind of ms-tnef wrapped mails
    there is actually a virtual attachment with a filename smime.p7m
    that contains our mimestructure. Happlily all our other code
    can handle this already.
    
    GnuPG-Bug-Id: T3802

diff --git a/src/mapihelp.cpp b/src/mapihelp.cpp
index 01aaf67..0c1bff3 100644
--- a/src/mapihelp.cpp
+++ b/src/mapihelp.cpp
@@ -1079,6 +1079,22 @@ change_message_class_ipm_note_smime (LPMESSAGE message)
         {
           newvalue = xstrdup ("IPM.Note.GpgOL.MultipartSigned");
         }
+      else if (ct && !strcmp (ct, "application/ms-tnef"))
+        {
+          /* So no PGP Inline. Lets look at the attachment. */
+          char *attach_mime = get_first_attach_mime_tag (message);
+          if (!attach_mime)
+            {
+              xfree (ct);
+              xfree (proto);
+              return nullptr;
+            }
+          if (!strcmp (attach_mime, "multipart/signed"))
+            {
+              newvalue = xstrdup ("IPM.Note.GpgOL.MultipartSigned");
+              xfree (attach_mime);
+            }
+        }
       else if (!opt.enable_smime)
         ; /* S/MIME not enabled; thus no further checks.  */
       else if (smtype)
@@ -1166,6 +1182,22 @@ change_message_class_ipm_note_smime_multipartsigned (LPMESSAGE message)
         {
           newvalue = xstrdup ("IPM.Note.GpgOL.MultipartSigned");
         }
+      else if (ct && !strcmp (ct, "application/ms-tnef"))
+        {
+          /* So no PGP Inline. Lets look at the attachment. */
+          char *attach_mime = get_first_attach_mime_tag (message);
+          if (!attach_mime)
+            {
+              xfree (ct);
+              xfree (proto);
+              return nullptr;
+            }
+          if (!strcmp (attach_mime, "multipart/signed"))
+            {
+              newvalue = xstrdup ("IPM.Note.GpgOL.MultipartSigned");
+              xfree (attach_mime);
+            }
+        }
       xfree (proto);
       xfree (ct);
     }

commit 7700f5da2744cc7aa718aaaeedc66618b4088bff
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Mon Feb 26 16:44:35 2018 +0100

    Add some more sender address lookups
    
    * src/mail.cpp (Mail::update_oom_data): Add more sender fallbacks.
    * src/oomhelp.h: Define new DASL's
    
    --
    These properties were the only way I could find the SMTP
    Address in an example mail from T3802.

diff --git a/src/mail.cpp b/src/mail.cpp
index d86d995..445c0ef 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -1247,6 +1247,26 @@ Mail::update_oom_data ()
           return 0;
         }
       xfree (buf);
+      /* We have a sender object but not yet an smtp address likely
+         exchange. Try some more propertys of the message. */
+      buf = get_pa_string (m_mailitem, PR_TAG_SENDER_SMTP_ADDRESS);
+      if (buf && strlen (buf))
+        {
+          log_debug ("%s:%s Sender fallback 3", SRCNAME, __func__);
+          m_sender = buf;
+          xfree (buf);
+          return 0;
+        }
+      xfree (buf);
+      buf = get_pa_string (m_mailitem, PR_TAG_RECEIVED_REPRESENTING_SMTP_ADDRESS);
+      if (buf && strlen (buf))
+        {
+          log_debug ("%s:%s Sender fallback 4", SRCNAME, __func__);
+          m_sender = buf;
+          xfree (buf);
+          return 0;
+        }
+      xfree (buf);
     }
   /* We don't have s sender object or SendUsingAccount,
      well, in that case fall back to the current user. */
@@ -1257,7 +1277,7 @@ Mail::update_oom_data ()
       gpgol_release (sender);
       if (buf && strlen (buf))
         {
-          log_debug ("%s:%s Sender fallback 3", SRCNAME, __func__);
+          log_debug ("%s:%s Sender fallback 5", SRCNAME, __func__);
           m_sender = buf;
           xfree (buf);
           return 0;
diff --git a/src/oomhelp.h b/src/oomhelp.h
index 1008860..4fb2492 100644
--- a/src/oomhelp.h
+++ b/src/oomhelp.h
@@ -113,6 +113,11 @@ DEFINE_OLEGUID(IID_IOleWindow,                0x00000114, 0, 0);
   "http://schemas.microsoft.com/mapi/proptag/0x370E001F"
 #define PR_ATTACH_CONTENT_ID_DASL \
   "http://schemas.microsoft.com/mapi/proptag/0x3712001F"
+#define PR_TAG_SENDER_SMTP_ADDRESS \
+  "http://schemas.microsoft.com/mapi/proptag/0x5D01001F"
+#define PR_TAG_RECEIVED_REPRESENTING_SMTP_ADDRESS \
+  "http://schemas.microsoft.com/mapi/proptag/0x5D08001F"
+
 #ifdef __cplusplus
 extern "C" {
 #if 0

-----------------------------------------------------------------------

Summary of changes:
 src/mail.cpp     | 22 +++++++++++++++++++++-
 src/mapihelp.cpp | 32 ++++++++++++++++++++++++++++++++
 src/oomhelp.h    |  5 +++++
 3 files changed, 58 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
GnuPG extension for MS Outlook
http://git.gnupg.org




More information about the Gnupg-commits mailing list