GNU bug report logs - #18513
24.3; message-mode sends unencrypted on error

Previous Next

Package: emacs;

Reported by: David Bremner <david <at> tethera.net>

Date: Sat, 20 Sep 2014 06:14:01 UTC

Severity: normal

Found in version 24.3

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Daiki Ueno <ueno <at> gnu.org>
To: David Bremner <david <at> tethera.net>
Cc: 18513 <at> debbugs.gnu.org
Subject: bug#18513: 24.3; message-mode sends unencrypted on error
Date: Mon, 29 Sep 2014 20:09:53 +0900
[Message part 1 (text/plain, inline)]
David Bremner <david <at> tethera.net> writes:

> 1) Start emacs with emacs -Q
> 2) start sending a message with M-x message-mail
> 3) add "sign" tag with C-c C-m C-s
> 3) manually replace "sign with "sigencrypt", simulating failed attempt to 
>    manually change mode
> 4) add some text to the message, set a destination address and 
>    subject
> 5) send using C-c C-c
>
> The message is sent unencrypted, without any feedback to the user.  It
> seems that the correct response would be to refuse to send a message
> with malformed mml tags.

I've installed the following simple fix in the trunk.  Does it work for you?
[mml.el.diff (text/x-diff, inline)]
=== modified file 'lisp/gnus/ChangeLog'
--- lisp/gnus/ChangeLog	2014-09-11 19:44:25 +0000
+++ lisp/gnus/ChangeLog	2014-09-29 11:02:32 +0000
@@ -1,3 +1,8 @@
+2014-09-29  Daiki Ueno  <ueno <at> gnu.org>
+
+	* mml.el (mml-parse-1): Error out if unknown mode is specified in
+	<#secure> tag (bug#18513).
+
 2014-09-11  Paul Eggert  <eggert <at> cs.ucla.edu>
 
 	* gnus-cloud.el (gnus-cloud-parse-version-1): Fix misspelling

=== 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")


This bug report was last modified 5 years and 291 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.