unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Daiki Ueno <ueno@gnu.org>
To: David Bremner <david@tethera.net>
Cc: 18513@debbugs.gnu.org
Subject: bug#18513: 24.3; message-mode sends unencrypted on error
Date: Mon, 29 Sep 2014 20:09:53 +0900	[thread overview]
Message-ID: <87zjdid6ny.fsf-ueno@gnu.org> (raw)
In-Reply-To: <878ulebz1x.fsf@maritornes.cs.unb.ca> (David Bremner's message of "Sat, 20 Sep 2014 08:12:26 +0200")

[-- Attachment #1: Type: text/plain, Size: 619 bytes --]

David Bremner <david@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?

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: mml.el.diff --]
[-- Type: text/x-diff, Size: 910 bytes --]

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


  reply	other threads:[~2014-09-29 11:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-20  6:12 bug#18513: 24.3; message-mode sends unencrypted on error David Bremner
2014-09-29 11:09 ` Daiki Ueno [this message]
2014-09-29 12:14   ` David Bremner
2014-09-30  1:36     ` Daiki Ueno
2019-09-23 11:46     ` Lars Ingebrigtsen
2019-09-23 12:18       ` David Bremner
2019-09-23 13:53         ` Lars Ingebrigtsen
2019-09-24 10:49           ` Daniel Kahn Gillmor
2019-09-25 13:05             ` Lars Ingebrigtsen
2014-10-01  1:28   ` Glenn Morris
2014-10-01  2:32     ` Daiki Ueno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zjdid6ny.fsf-ueno@gnu.org \
    --to=ueno@gnu.org \
    --cc=18513@debbugs.gnu.org \
    --cc=david@tethera.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).