From: Daiki Ueno <ueno@unixuser.org>
To: Luis Henriques <henrix@camandro.org>
Cc: ding@gnus.org
Subject: Re: Problems trying to decrypt email
Date: Thu, 24 May 2012 10:56:15 +0900 [thread overview]
Message-ID: <m362bmbav4.fsf-ueno@unixuser.org> (raw)
In-Reply-To: <87txz7s08q.fsf@camandro.org> (Luis Henriques's message of "Wed, 23 May 2012 10:41:25 +0100")
[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]
Luis Henriques <henrix@camandro.org> writes:
>>> I forgot to refer the different behaviour between the 2 Gnus versions:
>>>
>>> - Gnus shipped with Emacs:
>>> I select the email (summary buffer) and I get the question "Decrypt
>>> (PGP) part? (y or n)". When I answer 'y', I'm asked for the
>>> passphrase and get the email decrypted
>>>
>>> - Ma Gnus:
>>> I get the same question ("Decrypt (PGP) part? (y or n)") and when I
>>> reply 'y', I get another question: "Decrypt pgp encrypted part? (y
>>> or n)". Only after answering 'y' to this question I'm asked for the
>>> passphrase.
>>
>> Can't reproduce it with either Gnus shipped with Emacs (bzr trunk) nor Ma
>> Gnus (git master).
> I've sent you (privately) an encrypted email.
Thanks, I could reproduce it. It seems indeed to be caused by the
recent changes to Ma Gnus:
2012-02-16 Lars Ingebrigtsen <larsi@gnus.org>
* mm-decode.el (mm-dissect-singlepart): Guess what the type of
application/octet-stream parts really is.
I'm attaching a patch. Lars?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-mm-decode-don-t-touch-MIME-type-for-multipart-encryp.patch --]
[-- Type: text/x-patch, Size: 2034 bytes --]
From c08fe16a3e5c84195d449ee65e2bf33104cc870e Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@unixuser.org>
Date: Thu, 24 May 2012 10:45:38 +0900
Subject: [PATCH] mm-decode: don't touch MIME type for multipart/encrypted
children
The commit 1bf64efe introduced auto detection of actual MIME types
for application/octet-stream. That changes the MIME type of
encrypted part to "text/plain" when it has filename parameter with
".asc", and causes decryption failure.
---
lisp/mm-decode.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el
index 8076b2e..0ac3254 100644
--- a/lisp/mm-decode.el
+++ b/lisp/mm-decode.el
@@ -458,6 +458,7 @@ If not set, `default-directory' will be used."
(defvar mm-last-shell-command "")
(defvar mm-content-id-alist nil)
(defvar mm-postponed-undisplay-list nil)
+(defvar mm-inhibit-auto-detect-attachement nil)
;; According to RFC2046, in particular, in a digest, the default
;; Content-Type value for a body part is changed from "text/plain" to
@@ -668,7 +669,8 @@ MIME-Version header before proceeding."
;; Guess what the type of application/octet-stream parts should
;; really be.
(let ((filename (cdr (assq 'filename (cdr cdl)))))
- (when (and (equal (car ctl) "application/octet-stream")
+ (when (and (not mm-inhibit-auto-detect-attachement)
+ (equal (car ctl) "application/octet-stream")
filename
(string-match "\\.\\([^.]+\\)$" filename))
(let ((new-type (mailcap-extension-to-mime (match-string 1 filename))))
@@ -694,7 +696,9 @@ MIME-Version header before proceeding."
(goto-char (point-max))
(if (re-search-backward close-delimiter nil t)
(match-beginning 0)
- (point-max)))))
+ (point-max))))
+ (mm-inhibit-auto-detect-attachement
+ (equal (car ctl) "multipart/encrypted")))
(setq boundary (concat (regexp-quote boundary) "[ \t]*$"))
(while (and (< (point) end) (re-search-forward boundary end t))
(goto-char (match-beginning 0))
--
1.7.10.1
[-- Attachment #3: Type: text/plain, Size: 25 bytes --]
Regards,
--
Daiki Ueno
next prev parent reply other threads:[~2012-05-24 1:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 8:57 Luis Henriques
2012-05-22 23:33 ` Luis Henriques
2012-05-22 23:37 ` Luis Henriques
2012-05-23 2:36 ` Daiki Ueno
2012-05-23 9:41 ` Luis Henriques
2012-05-24 1:56 ` Daiki Ueno [this message]
2012-05-24 9:02 ` Luis Henriques
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m362bmbav4.fsf-ueno@unixuser.org \
--to=ueno@unixuser.org \
--cc=ding@gnus.org \
--cc=henrix@camandro.org \
/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.
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 NNTP newsgroup(s).