Skip to content

Commit

Permalink
Pass stream into parsePGPData()
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Nov 7, 2013
1 parent 1ef63fd commit aeb151b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions imp/lib/Mime/Viewer/Plain.php
Expand Up @@ -244,8 +244,12 @@ protected function _getEmbeddedMimeParts()
*/
protected function _parsePGP()
{
/* Avoid infinite loop. */
$parts = $GLOBALS['injector']->getInstance('IMP_Crypt_Pgp')->parsePGPData($this->_mimepart->getContents());
$parts = $GLOBALS['injector']->getInstance('IMP_Crypt_Pgp')->parsePGPData(
new Horde_Stream_Existing(array(
'stream' => $this->_mimepart->getContents(array('stream' => true))
))
);

if (empty($parts) ||
((count($parts) == 1) &&
($parts[0]['type'] == Horde_Crypt_Pgp::ARMOR_TEXT))) {
Expand Down
2 changes: 1 addition & 1 deletion imp/package.xml
Expand Up @@ -1225,7 +1225,7 @@
<package>
<name>Horde_Crypt</name>
<channel>pear.horde.org</channel>
<min>2.1.0</min>
<min>2.3.0</min>
<max>3.0.0alpha1</max>
<exclude>3.0.0alpha1</exclude>
</package>
Expand Down

0 comments on commit aeb151b

Please sign in to comment.