Subject: bug#18513: 24.3; message-mode sends unencrypted on error

From: David Bremner <[email-masked]>
Date: Mon, 29 Sep 2014 14:14:00 +0200

Daiki Ueno <[email-masked]> writes:

> I've installed the following simple fix in the trunk.  Does it work for you?

> === modified file 'lisp/gnus/mml.el'
> --- lisp/gnus/mml.el	2014-03-24 01:56:03 +0000
> +++ lisp/gnus/mml.el	2014-09-29 11:00:11 +0000
> @@ -257,7 +257,9 @@
>  		((string= mode "encrypt")
>  		 (setq tags (list "encrypt" method)))
>  		((string= mode "signencrypt")
> -		 (setq tags (list "sign" method "encrypt" method))))
> +		 (setq tags (list "sign" method "encrypt" method)))
> +		(t
> +		 (error "Unknown secure mode %s" mode)))
>  	  (eval `(mml-insert-tag ,secure-mode
>  				 ,@tags
>  				 ,(if keyfile "keyfile")

It's definitely an improvement, and it fixes the scenario I reported. On
the other hand, if the use corrupts the #secure tag then essentially the
same behaviour results. Would it be possible to have a strict mode where
any unknown mml tag causes an error?

David