Projects
Kolab:Winterfell
roundcubemail
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 23
View file
roundcubemail-1.2.tar.gz/CHANGELOG
Changed
@@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Enigma: Handle encrypted/signed content inside message/rfc822 attachments - Enigma: Fix missing html/plain switch on multipart/signed messages (#1490649) - Enigma: Disable format=flowed for signed plain text messages (#1490646) - Enigma: Fix handling of encrypted + signed messages (#1490632)
View file
roundcubemail-1.2.tar.gz/plugins/enigma/lib/enigma_engine.php
Changed
@@ -416,8 +416,7 @@ // including a set of appropriate content headers describing the data. // The second body MUST contain the PGP digital signature. It MUST be // labeled with a content type of "application/pgp-signature". - else if ($struct->ctype_parameters['protocol'] == 'application/pgp-signature' - && count($struct->parts) == 2 + else if (count($struct->parts) == 2 && $struct->parts[1] && $struct->parts[1]->mimetype == 'application/pgp-signature' ) { $this->parse_pgp_signed($p, $body); @@ -434,7 +433,7 @@ $struct = $p['structure']; // S/MIME - if ($struct->mimetype == 'application/pkcs7-mime') { + if ($p['mimetype'] == 'application/pkcs7-mime') { $this->parse_smime_encrypted($p); } // PGP/MIME: RFC3156 @@ -443,8 +442,7 @@ // This body contains the control information. // The second MIME body part MUST contain the actual encrypted data. It // must be labeled with a content type of "application/octet-stream". - else if ($struct->ctype_parameters['protocol'] == 'application/pgp-encrypted' - && count($struct->parts) == 2 + else if (count($struct->parts) == 2 && $struct->parts[0] && $struct->parts[0]->mimetype == 'application/pgp-encrypted' && $struct->parts[1] && $struct->parts[1]->mimetype == 'application/octet-stream' ) { @@ -676,7 +674,7 @@ $struct = $this->parse_body($body); // Modify original message structure - $this->modify_structure($p, $struct); + $this->modify_structure($p, $struct, strlen($body)); // Parse the structure (there may be encrypted/signed parts inside $this->part_structure(array( @@ -1143,10 +1141,11 @@ /** * Replace message encrypted structure with decrypted message structure * - * @param array - * @param rcube_message_part + * @param array Hook arguments + * @param rcube_message_part Part structure + * @param int Part size */ - private function modify_structure(&$p, $struct) + private function modify_structure(&$p, $struct, $size = 0) { // modify mime_parts property of the message object $old_id = $p['structure']->mime_id; @@ -1157,6 +1156,11 @@ } } + // set some part params used by Roundcube core + $struct->headers = array_merge($p['structure']->headers, $struct->headers); + $struct->size = $size; + $struct->filename = $p['structure']->filename; + // modify the new structure to be correctly handled by Roundcube $this->modify_structure_part($struct, $p['object'], $old_id); @@ -1184,7 +1188,6 @@ // Cache the fact it was decrypted $this->encrypted_parts[] = $part->mime_id; - $msg->mime_parts[$part->mime_id] = $part; // modify sub-parts
View file
roundcubemail-1.2.tar.gz/program/include/rcmail.php
Changed
@@ -2245,12 +2245,12 @@ $size = $this->show_bytes((int)$part->d_parameters['size']); } else { - $size = $part->size; - if ($part->encoding == 'base64') { - $size = $size / 1.33; - } + $size = $part->size; + if ($part->encoding == 'base64') { + $size = $size / 1.33; + } - $size = '~' . $this->show_bytes($size); + $size = '~' . $this->show_bytes($size); } return $size;
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.