6.0.0-alpha12
6/12/25

[#15026] BUG in Horde_Imap_Client : XML attachment is corrupted
Summary BUG in Horde_Imap_Client : XML attachment is corrupted
Queue Horde Framework Packages
Type Bug
State Not Reproducible
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester kripper (at) imatronix (dot) cl
Created 07/20/2020 (1788 days ago)
Due
Updated 01/31/2021 (1593 days ago)
Assigned 07/20/2020 (1788 days ago)
Resolved 01/31/2021 (1593 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
01/31/2021 06:38:06 PM Michael Rubinsky Assigned to Michael Rubinsky
State ⇒ Not Reproducible
 
07/27/2020 03:53:38 AM Michael Rubinsky Comment #5
Priority ⇒ 1. Low
Reply to this comment
Cannot reproduce this.

I imported the .eml file you sent me into my inbox and I can 
successfully parse the text/xml part, without any extraneous line 
breaks being inserted.

This is the quick bit of code I used to pull down the part, executed 
directly in Horde's admin phpshell:

<code>
// Get the Horde_Imap_Client object
$imap = $registry->mail->imapOb();

$mbox = new Horde_Imap_Client_Mailbox('INBOX');


// Fetch the message in question
$query = new Horde_Imap_Client_Fetch_Query();
$query->structure();
$query->envelope();
$query->headerText(array('peek' => true));

$results = $imap->fetch(
     $mbox,
     $query,
     array('ids' => new Horde_Imap_Client_Ids(array(436786)), 'exists' => true)
);

$message = $results[436786];

// Check out the mime part structure
$basePart = $message->getStructure();
foreach ($basePart->partIterator() as $part) {
   echo $part->getMimeId() . ': ' . $part->getType() . "\r\n";
}

// Get the part we want and decode it
$bpp = array(
   'decode' => true,
   'peek' => true);

$q = new Horde_Imap_Client_Fetch_Query();
$q->bodyPart(2, $bpp);
$q->mimeHeader(2, array('peek' => true));
$fetch_res = $imap->fetch(
   $mbox,
   $q,
   array('ids' => new Horde_Imap_Client_Ids(array(436786)))
);

// Output
echo $fetch_res[436786]->getBodyPart(2);
</code>


07/20/2020 06:20:40 PM kripper (at) imatronix (dot) cl Comment #4 Reply to this comment
Done. Thanks.
07/20/2020 06:15:45 PM Michael Rubinsky Comment #3
Priority ⇒ 2. Medium
State ⇒ Feedback
Reply to this comment
You can email any sensitive information to me directly at 
mrubinsk@horde.org.  If you'd like to encrypt it you can find my PGP 
key on keybase.io.  https://keybase.io/mrubinsk
07/20/2020 05:31:06 PM kripper (at) imatronix (dot) cl Comment #2 Reply to this comment
I would like to provide additional files with sensitive information, 
but this was not possible.
Please contact me via E-mail.
07/20/2020 05:08:25 PM kripper (at) imatronix (dot) cl Comment #1 (Private)
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ BUG in Horde_Imap_Client : XML attachment is corrupted
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
[Hidden]

Saved Queries