#3724: mime type application/pgp-encrypted breaks sending public keys with
extension .asc
-----------------------+----------------------
  Reporter:  na57teku  |      Owner:  mutt-dev
      Type:  defect    |     Status:  new
  Priority:  major     |  Milestone:
 Component:  mutt      |    Version:  1.5.23
Resolution:            |   Keywords:
-----------------------+----------------------

Comment (by code@…):

 {{{

 Normally, yes, clearly... but in this specific case that's not so clear.
 The trouble is that the application/pgp-encrypted MIME type is
 special--it is intended for use as part of multipart/encrypted message
 bodies, and that the mail client assemble it into a multi-part
 attachment with two parts (from RFC 3156):

       Mime-Version: 1.0
       Content-Type: multipart/encrypted; boundary=foo;
          protocol="application/pgp-encrypted"

       --foo
       Content-Type: application/pgp-encrypted

       Version: 1

       --foo
       Content-Type: application/octet-stream

       -----BEGIN PGP MESSAGE-----
       Version: 2.6.2

       hIwDY32hYGCE8MkBA/wOu7d45aUxF4Q0RKJprD3v5Z9K1YcRJ2fve87lMlDlx4Oj
       eW4GDdBfLbJE7VUpp13N19GL8e/AqbyyjHH4aS0YoTk10QQ9nnRvjY8nZL3MPXSZ
       g9VGQxFeGqzykzmykU6A26MSMexR4ApeeON6xzZWfo+0yOqAq6lb46wsvldZ96YA
       AABH78hyX7YX4uT1tNCWEIIBoqqvCeIMpp7UQ2IzBrXg6GtukS8NxbukLeamqVW3
       1yt21DYOjuLzcMNe/JNsD9vDVCvOOG3OCi8=
       =zzaA
       -----END PGP MESSAGE-----

       --foo--

 Now you can see where "Version: 1" came from.  From the bug report,
 clearly Mutt did at least some of this... and it's not clear that it
 shouldn't have.  Arguably you'd want it to be able to do that, or
 something like that, say, if you had prepared a message body for
 automation / batch processing / whatever.

 There MIGHT be a bug here if:

 1) Mutt SHOULD do something other than try to make a pgp-encrypted
    message body when asked to attach application/pgp-encrypted data

 2) Mutt SHOULD make a pgp-encrypted message body from the
    pgp-encrypted data (which must exist in the attachment for that to
    happen), but it left the message in a state where the multipart
    parts it created were inconsistent.

 Based on the available info, assuming the case of #2, Mutt may
 actually have done the right thing--or one version of the right thing.
 We need to see the full message text to be sure what it did, and then
 some thought needs to go into what the right behavior should be when
 someone tries to attach a pgp-encrypted attachment.  There are at
 least three options:

  - treat it as a normal attachment
  - treat it as a pgp-encrypted body
  - treat it as an error (since by definition attachments are not
    message bodies).

 }}}

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/3724#comment:3>
Mutt <http://www.mutt.org/>
The Mutt mail user agent

Reply via email to