Aleksander Machniak
2013-03-02 fddb9ff3839c239cb9c2f420562b651c540b5dcb
Display notice that message is encrypted also for application/pkcs7-mime messages (#1488526)
2 files modified
15 ■■■■ changed files
program/lib/Roundcube/rcube_message.php 11 ●●●●● patch | view | raw | blame | history
program/steps/mail/func.inc 4 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_message.php
@@ -468,6 +468,17 @@
            $this->parts[] = $p;
        }
        // this is an S/MIME ecrypted message -> create a plaintext body with the according message
        else if ($mimetype == 'application/pkcs7-mime') {
            $p = new stdClass;
            $p->type            = 'content';
            $p->ctype_primary   = 'text';
            $p->ctype_secondary = 'plain';
            $p->mimetype        = 'text/plain';
            $p->realtype        = 'application/pkcs7-mime';
            $this->parts[] = $p;
        }
        // message contains multiple parts
        else if (is_array($structure->parts) && !empty($structure->parts)) {
            // iterate over parts
program/steps/mail/func.inc
@@ -1079,9 +1079,9 @@
        $out .= html::div('message-partheaders', rcmail_message_headers(sizeof($header_attrib) ? $header_attrib : null, $part->headers));
      }
      else if ($part->type == 'content') {
        // unsapported
        // unsupported (e.g. encrypted)
        if ($part->realtype) {
          if ($part->realtype == 'multipart/encrypted') {
          if ($part->realtype == 'multipart/encrypted' || $part->realtype == 'application/pkcs7-mime') {
            $out .= html::span('part-notice', rcube_label('encryptedmessage'));
          }
          continue;