1 Return-Path: <jinwoo68@gmail.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 427C3431FC9
\r
6 for <notmuch@notmuchmail.org>; Wed, 28 Jan 2015 17:40:12 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=2.639 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 DNS_FROM_AHBL_RHSBL=2.438, FREEMAIL_ENVFROM_END_DIGIT=1,
\r
14 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id KBGwKc6bQmmj for <notmuch@notmuchmail.org>;
\r
18 Wed, 28 Jan 2015 17:40:09 -0800 (PST)
\r
19 Received: from mail-ie0-f177.google.com (mail-ie0-f177.google.com
\r
20 [209.85.223.177]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
21 (No client certificate requested)
\r
22 by olra.theworths.org (Postfix) with ESMTPS id 08D55431FAF
\r
23 for <notmuch@notmuchmail.org>; Wed, 28 Jan 2015 17:40:09 -0800 (PST)
\r
24 Received: by mail-ie0-f177.google.com with SMTP id vy18so27647071iec.8
\r
25 for <notmuch@notmuchmail.org>; Wed, 28 Jan 2015 17:40:08 -0800 (PST)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
27 h=from:to:cc:subject:date:message-id;
\r
28 bh=/M0DVCBfm04qMEg82klhFkDK/4bjh6g2EQ43o8/nlfU=;
\r
29 b=DFNT9Jv4rse9I9ngL/uk8n2hJGbq7jQIn53RiliJc8bDVrcWQEiujagri1GqNbJ9kq
\r
30 5Ik5TkE+dSvn5L5W7QfEkRT6le1i7fyTLSkwtKD5sj9L9iD8wTyEIBzY8Cg6i2iIch/M
\r
31 UjftqWkFwtVzfMjuvGKlSQ1tUXO7fkbF4RISRpPQBEVtwFV62Fb5OoHuzntCc4CtgXPk
\r
32 7dc/olzTWIbgqy0QDaT8cYK7vAPImf4ykqnRJLYoHR6vBkUbzrK3GnFudpOt+esaUfW0
\r
33 iKOOn7ASzwPXMXSG9oJCAK1doUep/ZHM4JnrWkS+G6JBvY849UYv42ecKX98iWKhMBCG
\r
35 X-Received: by 10.43.139.79 with SMTP id iv15mr463152icc.81.1422495608622;
\r
36 Wed, 28 Jan 2015 17:40:08 -0800 (PST)
\r
37 Received: from jinwoo-macbookair.roam.corp.google.com.com ([172.19.61.138])
\r
38 by mx.google.com with ESMTPSA id ig15sm209173igb.10.2015.01.28.17.40.07
\r
39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
\r
40 Wed, 28 Jan 2015 17:40:08 -0800 (PST)
\r
41 From: Jinwoo Lee <jinwoo68@gmail.com>
\r
42 To: notmuch@notmuchmail.org
\r
43 Subject: [PATCH] Add a defcustom for whether to block remote images by
\r
45 Date: Wed, 28 Jan 2015 17:39:32 -0800
\r
46 Message-Id: <1422495572-40384-1-git-send-email-jinwoo68@gmail.com>
\r
47 X-Mailer: git-send-email 2.2.2
\r
48 X-BeenThere: notmuch@notmuchmail.org
\r
49 X-Mailman-Version: 2.1.13
\r
51 List-Id: "Use and development of the notmuch mail system."
\r
52 <notmuch.notmuchmail.org>
\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
56 List-Post: <mailto:notmuch@notmuchmail.org>
\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
60 X-List-Received-Date: Thu, 29 Jan 2015 01:40:12 -0000
\r
63 emacs/notmuch-show.el | 15 +++++++++++----
\r
64 1 file changed, 11 insertions(+), 4 deletions(-)
\r
66 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
67 index 66350d4..bc48922 100644
\r
68 --- a/emacs/notmuch-show.el
\r
69 +++ b/emacs/notmuch-show.el
\r
70 @@ -136,6 +136,11 @@ indentation."
\r
72 :group 'notmuch-show)
\r
74 +(defcustom notmuch-show-block-remote-images t
\r
75 + "Block remote images by default."
\r
77 + :group 'notmuch-show)
\r
79 (defvar notmuch-show-thread-id nil)
\r
80 (make-variable-buffer-local 'notmuch-show-thread-id)
\r
81 (put 'notmuch-show-thread-id 'permanent-local t)
\r
82 @@ -798,10 +803,12 @@ will return nil if the CID is unknown or cannot be retrieved."
\r
83 ;; URL-decode it (see RFC 2392).
\r
84 (let ((cid (url-unhex-string url)))
\r
85 (first (notmuch-show--get-cid-content cid)))))
\r
86 - ;; Block all external images to prevent privacy leaks and
\r
87 - ;; potential attacks. FIXME: If we block an image, offer a
\r
88 - ;; button to load external images.
\r
89 - (shr-blocked-images "."))
\r
90 + ;; By default, block all external images to prevent privacy
\r
91 + ;; leaks and potential attacks. FIXME: If we block an image,
\r
92 + ;; offer a button to load external images.
\r
93 + (shr-blocked-images (if notmuch-show-block-remote-images
\r
95 + shr-blocked-images)))
\r
96 (shr-insert-document dom)
\r