Re: mutt feeds more to gnupg than it needs, causes invisible/lost

2009-11-28 Thread martin f krafft
also sprach Derek Martin  [2009.11.28.0314 +0100]:
> I have pgp_auto_decode set, and additionally I unset it and manually
> executed check-traditional-pgp, and I saw the above text in all cases.
> So unless I misunderstood you, it seems my Mutt behaves differently
> from yours...

Indeed, and I take curiosity in that. More below...

> But besides that, check-traditional-pgp is not intended to work
> with MIME messages...

(I know)

>3.153. pgp_auto_decode
[...]
> So, you may not like the behavior, but it's not a bug.  The
> solution, as already noted, is to unset pgp_auto_decode.  It's
> neither appropriate nor required for MIME-based PGP mails, as mutt
> already does the right thing there without it if the messages are
> marked properly.  The option is probably obsolete or headed there,
> and probably should not be set by default.

I think the actual bug I am looking at is not with pgp_auto_decode,
since, as far as I understand, it only calls 
on *every* message.

The problem is with . If you have a message
that is:

  unsigned content
  -- begin signed --
  signed content
  -- signature --
  OSCNLKSknsc..
  -- end signed --
  unsigned content

then  will feed all 7 lines to GPG, and GPG 
will swallow the first and the last lines.

Either gnupg needs to learn to emit unsigned content, and visually
distinguish signed from unsigned content, e.g

  unsigned content
  -- begin signed content --
  signed content
  -- end signed content --
  unsigned content

or mutt needs to learn to only pass the signed content (along with
the signature) to gnupg.

I /think/ that the latter is the better solution, because mutt
already uses visual markers to distinguish signed from unsigned
content:

  [-- The following data is signed --](that should be s/is/are/)

and re-using output from gnupg and reformatting it (e.g. to appear
bold) just seems a bit like a hack.

Also, it makes no real sense to filter unsigned content through
gnupg and expect it to return it verbatim, IMHO.

I think  needs to learn to only pass to gnupg
those parts of a message that are marked up as inline-signed, and
put the output between the aforementioned visual markers.

Everything else should be shown verbatim in the pager, and not
passed to the gnupg tool for verification.

Am I making sense?

-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
a farmer is a man outstanding in his field.
 
spamtraps: madduck.bo...@madduck.net


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)


Re: mutt feeds more to gnupg than it needs, causes invisible/lost

2009-11-28 Thread David J. Weller-Fahy
* Todd Zullinger  [2009-11-27 21:07 -0500]:
> If you call check-traditional-pgp on this message, is this text lost?
> It is for me and I would call it a bug.  It might also be some subtle
> difference between our configurations, gpg versions, etc.

FWIW I copied your message into ~/test, and then opened it using the
latest tip, and the following command-line.

#v+
mutt -n -F usr/share/doc/mutt/samples/gpg.rc -f ~/test
#v-

I then entered ':exec check-traditional-pgp' in mutt, and viewed the
message.  The text preceding the digitally signed portion of the message
was still visible.

My mutt is:

#v+
Mutt 1.5.20 (2009-10-28)
Copyright (C) 1996-2009 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Darwin 10.2.0 (i386)
ncurses: ncurses 5.7.20081102 (compiled with 5.7)
libiconv: 1.11
hcache backend: tokyocabinet 1.4.35
Compile options:
-DOMAIN
+DEBUG
+HOMESPOOL  -USE_SETGID  +USE_DOTLOCK  -DL_STANDALONE  +USE_FCNTL
-USE_FLOCK
-USE_POP  +USE_IMAP  +USE_SMTP
+USE_SSL_OPENSSL  -USE_SSL_GNUTLS  +USE_SASL  -USE_GSS
+HAVE_GETADDRINFO
+HAVE_REGCOMP  -USE_GNU_REGEX
+HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET
+HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM
+CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME
-CRYPT_BACKEND_GPGME
-EXACT_ADDRESS  -SUN_ATTACHMENT
+ENABLE_NLS  -LOCALES_HACK  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET
+HAVE_LANGINFO_YESEXPR
+HAVE_ICONV  -ICONV_NONTRANS  -HAVE_LIBIDN  +HAVE_GETSID  +USE_HCACHE
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="Maildir"
PKGDATADIR="/Users/dave/usr/share/mutt"
SYSCONFDIR="/Users/dave/usr/etc"
EXECSHELL="/bin/sh"
-MIXMASTER
To contact the developers, please mail to .
To report a bug, please visit http://bugs.mutt.org/.
#v-

I seem to recall this being brought up previously on the mailing list,
but can't find any reference (which may mean it is all in my head).
I'll keep searching, but haven't found anything about this particular
problem yet.

JADP.

Regards,
-- 
dave [ please don't CC me ]


pgpoGNubLzcgO.pgp
Description: PGP signature