6.0.0-beta1
9/20/25

[#13117] Several errors with attached PGP messages
Summary Several errors with attached PGP messages
Queue IMP
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester jan (at) horde (dot) org
Created 04/15/2014 (4176 days ago)
Due
Updated 04/22/2014 (4169 days ago)
Assigned 04/15/2014 (4176 days ago)
Resolved 04/22/2014 (4169 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/22/2014 05:18:02 AM Michael Slusarz Comment #4
State ⇒ Resolved
Reply to this comment
Horde_Mime 2.3.1
04/22/2014 05:10:28 AM Git Commit Comment #3 Reply to this comment
Changes have been made in Git (master):

commit e2e1e3ce80da58b0d4440dc3cac6e37d5a8fc772
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Mon Apr 21 23:01:48 2014 -0600

     [mms] Fix Horde_Mime_Part#buildMimeIds() when called on the base 
embedded object of a parent part (Bug #13117).

  framework/Mime/lib/Horde/Mime/Part.php             |    2 +-
  framework/Mime/package.xml                         |   10 +++--
  framework/Mime/test/Horde/Mime/PartTest.php        |   20 +++++++++++
  .../Mime/test/Horde/Mime/fixtures/bug13117.txt     |   34 
++++++++++++++++++++
  4 files changed, 61 insertions(+), 5 deletions(-)

http://github.com/horde/horde/commit/e2e1e3ce80da58b0d4440dc3cac6e37d5a8fc772
04/17/2014 12:58:51 AM Michael Slusarz Comment #2 Reply to this comment
Confirmed.  Has something to do with incorrect generation of MIME IDs 
for the embedded parts.
04/15/2014 02:28:33 PM Jan Schneider Comment #1
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Assigned to Michael Slusarz
Queue ⇒ IMP
Summary ⇒ Several errors with attached PGP messages
Type ⇒ Bug
State ⇒ Assigned
Reply to this comment
If a PGP MIME message is attached to another message, e.g. by 
forwarding a PGP-encrypted message, there are the following errors in 
the logs after providing the PGP passphrase:

2014-04-15T16:19:53+02:00 WARN: HORDEDEVELOP [imp] PHP ERROR: 
spl_object_hash() expects parameter 1 to be object, null given [pid 
1133 on line 61 of 
"/home/jan/horde-develop/imp/lib/Factory/MimeViewer.php"]
2014-04-15T16:19:53+02:00 EMERG: HORDEDEVELOP [imp] Call to a member 
function getType() on a non-object [pid 1133 on line 58 of 
"/home/jan/horde-develop/framework/Core/lib/Horde/Core/Factory/MimeViewer.php"]

The same happens if you try to download the message/rfc822 attachment 
that contains the PGP message:


( ! ) Fatal error: Call to a member function getType() on a non-object 
in 
/home/jan/horde-develop/framework/Core/lib/Horde/Core/Factory/MimeViewer.php 
on line 58
Call Stack
#        Time        Memory        Function        Location
1        0.0207        245864        {main}( )        ../index.php:0
2        0.1028        2266384        Horde_Registry->callAppMethod( 'imp', 'download', 
array ('args' => array (0 => class Horde_Variables { protected 
$_expected = array (...); protected $_sanitized = FALSE; protected 
$_vars = array (...) })) )        ../index.php:33
3        0.1032        2267008        call_user_func_array ( array (0 => class 
IMP_Application { public $auth = array (0 => 'add', 1 => 
'authenticate', 2 => 'list', 3 => 'remove', 4 => 'transparent'); 
public $features = array ('dynamicView' => TRUE, 'minimalView' => 
TRUE, 'notificationHandler' => TRUE, 'smartmobileView' => TRUE); 
public $version = 'H5 (6.2.0-git)'; protected $_oldserver = NULL; 
public $initParams = array (); protected $_app = 'imp'; protected 
$_sessVars = array () }, 1 => 'download'), array (0 => class 
Horde_Variables { protected $_expected = array (); protected 
$_sanitized = FALSE; protected $_vars = array ('app' => 'imp', 
'actionID' => 'download_attach', 'id' => '2', 'muid' => 
'{5}INBOX339738', 'view_token' => '9wbSGF2k9Je7uGK570R7Pw1', 
'filename' => 'Original Message[13].eml') }) )        ../Registry.php:1171
4        0.1032        2267832        IMP_Application->download( class Horde_Variables { 
protected $_expected = array (); protected $_sanitized = FALSE; 
protected $_vars = array ('app' => 'imp', 'actionID' => 
'download_attach', 'id' => '2', 'muid' => '{5}INBOX339738', 
'view_token' => '9wbSGF2k9Je7uGK570R7Pw1', 'filename' => 'Original 
Message[13].eml') } )        ../Registry.php:1171
5        0.1639        2779384        IMP_Contents_View->downloadAttach( '2', NULL 
)        ../Application.php:538
6        0.1773        2779648        IMP_Contents->getMIMEPart( '2', ??? )        ../View.php:95
7        0.1774        2780136        IMP_Contents->_buildMessage( ??? )        ../Contents.php:516
8        0.9785        4913600        IMP_Factory_MimeViewer->create( NULL, array 
('contents' => class IMP_Contents { protected $_build = TRUE; 
protected $_embedded = array (0 => '2.0.3'); protected $_header = 
class Horde_Imap_Client_Data_Fetch { protected $_data = array (...) }; 
protected $_indices = class IMP_Indices_Mailbox { public $buids = 
class IMP_Indices { ... }; public $mailbox = class IMP_Mailbox { ... 
}; protected $_indices = array (...) }; protected $_message = class 
Horde_Mime_Part { protected $_type = 'multipart'; protected $_subtype 
= 'mixed'; protected $_contents = NULL; protected $_transferEncoding = 
'binary'; protected $_language = array (...); protected $_description 
= ''; protected $_disposition = ''; protected $_dispParams = array 
(...); protected $_contentTypeParams = class 
Horde_Support_CaseInsensitiveArray { ... }; protected $_parts = array 
(...); protected $_mimeid = '0'; protected $_eol = '\n'; protected 
$_temp = array (...); protected $_metadata = array (...); protected 
$_boundary = '=_Zvr-QJX3EyFVT44FG70guA6'; protected $_bytes = NULL; 
protected $_contentid = NULL; protected $_duration = NULL; protected 
$_reindex = FALSE; protected $_basepart = FALSE; protected 
$_hdrCharset = NULL; protected $_serializedVars = array (...) }; 
protected $_viewcache = class stdClass { public $pgp = array (...) } 
}) )        ../Contents.php:1103
9        0.9803        4919800        Horde_Core_Factory_MimeViewer->create( NULL, array 
('app' => 'imp') )        ../MimeViewer.php:71
Ein schwerer Fehler ist aufgetreten:
Call to a member function getType() on a non-object

1. Horde_ErrorHandler::catchFatalError()

Details
Die vollständige Fehlermeldung wurde in Hordes Logdatei geschrieben 
und für Administratoren weiter unten ausgegeben. Benutzer, die keine 
Administratoren sind, bekommen diese Details nicht zu sehen.

ErrorException Object
(
     [message:protected] => Call to a member function getType() on a non-object
     [string:Exception:private] =>
     [code:protected] => 0
     [file:protected] => 
/home/jan/horde-develop/framework/Core/lib/Horde/Core/Factory/MimeViewer.php
     [line:protected] => 58
     [trace:Exception:private] => Array
         (
             [0] => Array
                 (
                     [function] => catchFatalError
                     [class] => Horde_ErrorHandler
                     [type] => ::
                     [args] => Array
                         (
                         )

                 )

         )

     [previous:Exception:private] =>
     [severity:protected] => 1
     [logged] => 1
)

Saved Queries