11756 multipart/alternative; with PGP parts fails to decrypt
authorCornelius Weiß <c.weiss@metaways.de>
Fri, 8 Apr 2016 16:21:11 +0000 (18:21 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 18 Apr 2016 07:38:55 +0000 (09:38 +0200)
Change-Id: Ib21ab85e587f6fe1b0a07ab64e09c8506b92c8fe
Reviewed-on: http://gerrit.tine20.com/customers/3030
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Cornelius Weiss <c.weiss@metaways.de>
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tests/tine20/Felamimail/Frontend/JsonTest.php
tests/tine20/Felamimail/files/multipart_alternative_pgp_inline.eml [new file with mode: 0644]
tine20/Felamimail/Controller/Message.php

index 217d5ed..2247041 100644 (file)
@@ -1210,6 +1210,19 @@ IbVx8ZTO7dJRKrg72aFmWTf0uNla7vicAhpiLWobyNYcZbIjrAGDfg==
         $this->assertContains('-----BEGIN PGP MESSAGE-----', $fullMessage['preparedParts'][0]['preparedData']);
     }
 
+    public function testMessagePGPInline()
+    {
+        $inbox = $this->_getFolder('INBOX');
+        $mailAsString = file_get_contents(dirname(__FILE__) . '/../files/multipart_alternative_pgp_inline.eml');
+        Felamimail_Controller_Message::getInstance()->appendMessage($inbox, $mailAsString);
+
+        $this->_foldersToClear = array('INBOX');
+        $message = $this->_searchForMessageBySubject('Re: mailvelope und tine20');
+
+        $fullMessage = $this->_json->getMessage($message['id']);
+        $this->assertFalse(empty($fullMessage['preparedParts']));
+    }
+
     /*********************** sieve tests ****************************/
     
     /**
diff --git a/tests/tine20/Felamimail/files/multipart_alternative_pgp_inline.eml b/tests/tine20/Felamimail/files/multipart_alternative_pgp_inline.eml
new file mode 100644 (file)
index 0000000..98906aa
--- /dev/null
@@ -0,0 +1,208 @@
+Return-Path: <thomas@mailvelope.com>\r
+Delivered-To: <cweiss@metaways.de>\r
+Received: from mail03.metaways.net ([10.129.3.213])\r
+       by mail03.metaways.net (Dovecot) with LMTP id sRwED3RkBldLYQAA5ANymA\r
+       for <cweiss@metaways.de>; Thu, 07 Apr 2016 15:45:24 +0200\r
+Received: from mx03.metaways.net ([127.0.0.1])\r
+       by mail03.metaways.net (Dovecot) with LMTP id heejDnRkBldKYQAA5ANymA\r
+       ; Thu, 07 Apr 2016 15:45:24 +0200\r
+Received: from mail-yw0-f170.google.com (mail-yw0-f170.google.com [209.85.161.170])\r
+       by mx03.metaways.net (Postfix) with ESMTPS id E8754212C\r
+       for <c.weiss@metaways.de>; Thu,  7 Apr 2016 15:45:22 +0200 (CEST)\r
+Received: by mail-yw0-f170.google.com with SMTP id t10so96916384ywa.0\r
+        for <c.weiss@metaways.de>; Thu, 07 Apr 2016 06:45:22 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+        d=mailvelope.com; s=google;\r
+        h=mime-version:in-reply-to:references:date:message-id:subject:from:to;\r
+        bh=DA8m9kynvQyPxx4zYMdnGtkBSm9oYV6Qp1J15pVpvfE=;\r
+        b=gJHEGl2utZ84XN0itLD51eWe9Hj1cUuemk87XmdRMTvKsjjFNmTyh4ARHSq/YQOrY+\r
+         fQ9Gvy3UjG+131CFD2jcRqoNofdRbFXniIGCoX+UIGupDGmXAOxWj84qPBGes+r0N+Nq\r
+         UQbIfQ989//pE/P0C5WBFaqyAEq6zpz+nJt+g=\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+        d=1e100.net; s=20130820;\r
+        h=x-gm-message-state:mime-version:in-reply-to:references:date\r
+         :message-id:subject:from:to;\r
+        bh=DA8m9kynvQyPxx4zYMdnGtkBSm9oYV6Qp1J15pVpvfE=;\r
+        b=IrcdaWcf5r5qyROo0FCu9eGSR9g/a84CLFTOjMLYD8PgLT6Oouu23KGto+yyrr9quG\r
+         zPxSQ8B3wBZI60Z44HHyWffF63gOKCXzvu+GzsupmCpSzHe9NH/7FvWBR6W16BthX8pI\r
+         uaa231sNy2W1dv5xHM5usKX6lAoM4HDfS/nSjBwLWeKyOeDgZGbRYSLo/pAnLoIu3g9R\r
+         shXhXHp/3SJdU9eVl39+ExbXeuL7dwvdB3s7EYr76EHQ3n7qj4MF6dGlv+bqyaVLWtZI\r
+         eOXVZcEe+ESKZ2u/oBjUIXyTXw9duFwPjIOI5FE8+Bu/Bwr82tXXSsfVSfGCKjxanXME\r
+         EJqQ==\r
+X-Gm-Message-State: AD7BkJJDIpIn+OIxFNLv0Z3+62Q5qTPoFNE+Zb84OrAwT8V6FP9wWBqWfYSdQI96IHtb0aiCRE06+GZcibJGFA==\r
+MIME-Version: 1.0\r
+X-Received: by 10.129.87.206 with SMTP id l197mr1581903ywb.312.1460036720599;\r
+ Thu, 07 Apr 2016 06:45:20 -0700 (PDT)\r
+Received: by 10.37.65.83 with HTTP; Thu, 7 Apr 2016 06:45:20 -0700 (PDT)\r
+In-Reply-To: <b2ea857d45f63a0ff1aa3d3b34f98dbc24ec39f0@metaways.de>\r
+References: <31e080fd293da45f754069194cde530ee2051682@metaways.de>\r
+       <CAMQ7_A6GYu1yiWxpfUJ7MQ3LzCx1rSsN2SraPJZ_X+T54gaagw@mail.gmail.com>\r
+       <139452372f23c19631a5cbbc2817dccf8bb30ee5@metaways.de>\r
+       <CAOrwtgkWi3-PbDPnbrdZSB681VtFxzX_7qeC73jeGpj5P5H03w@mail.gmail.com>\r
+       <40b040a86b1525fa8673f407f36a24b1b0f14592@metaways.de>\r
+       <CAOrwtg=NAhneN2r8YCHEvMC53UgRKTPiJ0aWWTVOAh67h4Voqg@mail.gmail.com>\r
+       <CAOrwtgk-iLvBcuCa91hS6kneXZqP72oS7ME6Kp58Tf9wPccpkw@mail.gmail.com>\r
+       <32589991a20208719a52b2e42058c43d6838b5bf@metaways.de>\r
+       <CAOrwtgm9G=z=xsPRZzSH5hhkH8-SyJnoQdsJxtazm8UAmjqhRA@mail.gmail.com>\r
+       <b36d390330347c77e2600a210fd99a765944bcda@metaways.de>\r
+       <CAOrwtgkXQ3BrWFY=2EdW9TpRemqrJPQbLcOexRdwcyXwdAM_pQ@mail.gmail.com>\r
+       <c0837421e695fd15c7865f4b744995cedc97f705@metaways.de>\r
+       <CAOrwtg=e6u1t03gkQycq-xfWpCFcd0nc9My1-7gOA-iYPpE=MA@mail.gmail.com>\r
+       <712ad8ebf6481e35b0623944db6e3625abbaa9a7@metaways.de>\r
+       <CAOrwtgmrfNL4W9LJHKnAh164Y6OgM4KvAq+T5tiATQZxRMrzWQ@mail.gmail.com>\r
+       <b2ea857d45f63a0ff1aa3d3b34f98dbc24ec39f0@metaways.de>\r
+Date: Thu, 7 Apr 2016 15:45:20 +0200\r
+Message-ID: <CAOrwtgnVa7CLsu=o6VmY7oMHguS0OxZYR3NjO-rf9HW-0CorMQ@mail.gmail.com>\r
+Subject: Re: mailvelope und tine20\r
+From: =?UTF-8?Q?Thomas_Obernd=C3=B6rfer?= <thomas@mailvelope.com>\r
+To: Cornelius Weiss <c.weiss@metaways.de>\r
+Content-Type: multipart/alternative; boundary=001a11462a14175d9e052fe54a5d\r
+X-Spam-Status: No, score=-0.5 required=5.0 tests=AWL,DKIM_SIGNED,DKIM_VALID,\r
+       DKIM_VALID_AU,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,\r
+       RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0\r
+X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail03.metaways.net\r
+\r
+--001a11462a14175d9e052fe54a5d\r
+Content-Type: text/plain; charset=UTF-8\r
+\r
+-----BEGIN PGP MESSAGE-----\r
+Version: Mailvelope v1.3.6\r
+Comment: https://www.mailvelope.com\r
+\r
+wcFMAzCKKLdTMVbPARAAnx+6ZovJTS+YXDzPfuBt36hl79wncZ/qx9A1SkxV\r
+dUnrUI9rwQLYBlHOUdCKv1bL8onKPKtpfxZHNiYyv5hiY2Bsn9SYDAz2oghu\r
+R2t3hwRN48RVoxOMgADkGLTNPSmnUgkTIhn46Ywz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r
+/RymUEfqWgDA4OPAzL0RGYyWrfKXz+0FJfI7JLAOW7gAegOl1WvKIdvpJl+2\r
+dMAV+4yiawrIym1lBkjOORaeUhUIuiK+uZhhruV/SWs6ReWk/uFKElTtWqS3\r
+Yo/s8zZE6+wY0Dz/DQsVQNKxnUYTRRoG8Kuj1461f3ikjOAieEkkswTTzZj5\r
+rIrhPDGBuO/xq4thtTAfHLZ53S+/nqVHmvDYiLbqxQTKhi8MX8pGKjCdli0W\r
+F4eN5Xbgtl9AXAOWJw9TCajm6zLpz594IgcqK9Tow2fopa5w7wjEisJWGCoB\r
+S9ipwLENwJNwjlNEZhBeHpV7y+mleB6K0mxwPsbnh7CM8Qqh+bd7K25KrxdJ\r
+ydOacfnz0Gek9xMq+vSVDzn/krFVp27mrUo47d7XrXzKgjyZMjSBEIm5groY\r
+7Rv0SZeNivsQOi0z4H++6XOx/9T2pMK8EOtzR6W7JHuCOVH2hw==\r
+=Ypx9\r
+-----END PGP MESSAGE-----\r
+\r
+--001a11462a14175d9e052fe54a5d\r
+Content-Type: text/html; charset=UTF-8\r
+\r
+<div dir="ltr"><pre>-----BEGIN PGP MESSAGE-----\r
+Version: Mailvelope v1.3.6\r
+Comment: <a href="https://www.mailvelope.com">https://www.mailvelope.com</a>\r
+\r
+wcFMAzCKKLdTMVbPARAAnx+6ZovJTS+YXDzPfuBt36hl79wncZ/qx9A1SkxV\r
+dUnrUI9rwQLYBlHOUdCKv1bL8onKPKtpfxZHNiYyv5hiY2Bsn9SYDAz2oghu\r
+R2t3hwRN48RVoxOMgADkGLTNPSmnUgkTIhn46Ywzl+ZfSo3EmNA6+CZWG9bF\r
+L2AGj7c8A0v7BdUqxiuBCpwUDaukUCYQ8micodDf9PoLx0vDXBfXvnoItvNp\r
+sGGnipstNxDBuuwDqxwUV8LNvfBKYBpHFo1JxRIH0rxoiuZMXA5vIe6/lML8\r
+E8uksOGemqtEzXpNRm3MnfhR7s/z5qv+NA6pllbAbx4t0MqEGJknlPgeX1zS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tTAfHLZ53S+/nqVHmvDYiLbqxQTKhi8MX8pGKjCdli0W\r
+F4eN5Xbgtl9AXAOWJw9TCajm6zLpz594IgcqK9Tow2fopa5w7wjEisJWGCoB\r
+S9ipwLENwJNwjlNEZhBeHpV7y+mleB6K0mxwPsbnh7CM8Qqh+bd7K25KrxdJ\r
+ydOacfnz0Gek9xMq+vSVDzn/krFVp27mrUo47d7XrXzKgjyZMjSBEIm5groY\r
+7Rv0SZeNivsQOi0z4H++6XOx/9T2pMK8EOtzR6W7JHuCOVH2hw==\r
+=Ypx9\r
+-----END PGP MESSAGE-----\r
+<pre></pre></pre></div>\r
+\r
+--001a11462a14175d9e052fe54a5d--\r
index 268c251..3c29027 100644 (file)
@@ -170,7 +170,7 @@ class Felamimail_Controller_Message extends Tinebase_Controller_Record_Abstract
             Felamimail_Controller_Message_Flags::getInstance()->setSeenFlag($message);
         }
 
-        $this->prepareAndProcessParts($message);
+        $this->prepareAndProcessParts($message, $account);
         
         if (Tinebase_Core::isLogLevel(Zend_Log::TRACE)) Tinebase_Core::getLogger()->trace(__METHOD__ . '::' . __LINE__ . ' ' . print_r($message->toArray(), true));
         
@@ -261,8 +261,9 @@ class Felamimail_Controller_Message extends Tinebase_Controller_Record_Abstract
      * prepare message parts that could be interesting for other apps
      * 
      * @param Felamimail_Model_Message $_message
+     * @param Felamimail_Model_Account $_account
      */
-    public function prepareAndProcessParts(Felamimail_Model_Message $_message)
+    public function prepareAndProcessParts(Felamimail_Model_Message $_message, Felamimail_Model_Account $_account)
     {
         $preparedParts = new Tinebase_Record_RecordSet('Felamimail_Model_PreparedMessagePart');
         
@@ -316,7 +317,7 @@ class Felamimail_Controller_Message extends Tinebase_Controller_Record_Abstract
 
         // PGP INLINE
         if (strpos($_message->body, '-----BEGIN PGP MESSAGE-----') !== false) {
-            preg_match('/-----BEGIN PGP MESSAGE-----.*-----END PGP MESSAGE-----/', $_message->body, $matches);
+            preg_match('/(-----BEGIN PGP MESSAGE-----.*-----END PGP MESSAGE-----)/msU', $_message->body, $matches);
             $amored = Felamimail_Message::convertFromHTMLToText($matches[0]);
 
             $preparedParts->addRecord(new Felamimail_Model_PreparedMessagePart(array(