From f11f08eab8b5e7b73742b2855a89bd999aa807e6 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 19 May 2009 04:45:35 -0600 Subject: [PATCH] Bug #8228: Fix parsing of armored PGP signed messages Correctly check Content-Type, not Content-Type parameter. --- imp/lib/Mime/Viewer/Pgp.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imp/lib/Mime/Viewer/Pgp.php b/imp/lib/Mime/Viewer/Pgp.php index 501afee40..ab90ca6f4 100644 --- a/imp/lib/Mime/Viewer/Pgp.php +++ b/imp/lib/Mime/Viewer/Pgp.php @@ -340,11 +340,11 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver $signed_data = $GLOBALS['imp_imap']->ob->utils->removeBareNewlines($this->_params['contents']->getBodyPart($signed_id, array('mimeheaders' => true))); $sig_part = $this->_params['contents']->getMIMEPart($sig_id); - /* Check for the 'x-imp-pgp-signature' param. This is set by the - * plain driver when parsing PGP armor text. */ + /* Check for 'x-imp-pgp-signature' type. This is set by the + * 'plain' driver when parsing PGP armor text. */ $graphicsdir = $GLOBALS['registry']->getImageDir('horde'); try { - $sig_result = $sig_part->getContentTypeParameter('x-imp-pgp-signature') + $sig_result = ($sig_part->getType() == 'x-imp-pgp-signature') ? $this->_imppgp->verifySignature($signed_data, $this->_address) : $this->_imppgp->verifySignature($signed_data, $this->_address, $sig_part->getContents()); -- 2.11.0