1 Return-Path: <tomi.ollila@iki.fi>
\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 6F7FF431FC3
\r
6 for <notmuch@notmuchmail.org>; Sun, 1 Feb 2015 13:43:13 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=2.438 tagged_above=-999 required=5
\r
12 tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id FP5+FLjgOCyU for <notmuch@notmuchmail.org>;
\r
16 Sun, 1 Feb 2015 13:43:11 -0800 (PST)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id E0C58431FC2
\r
19 for <notmuch@notmuchmail.org>; Sun, 1 Feb 2015 13:43:10 -0800 (PST)
\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])
\r
21 by guru.guru-group.fi (Postfix) with ESMTP id 7415510004A;
\r
22 Sun, 1 Feb 2015 23:42:49 +0200 (EET)
\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
24 To: David Edmondson <dme@dme.org>, Jinwoo Lee <jinwoo68@gmail.com>,
\r
25 notmuch@notmuchmail.org
\r
26 Subject: Re: [PATCH] emacs: Add a defcustom that specifies regexp
\r
27 for blocked remote images.
\r
28 In-Reply-To: <cunlhkhe2l3.fsf@fenchurch.hh.sledj.net>
\r
29 References: <1422567352-32647-1-git-send-email-jinwoo68@gmail.com>
\r
30 <cunlhkhe2l3.fsf@fenchurch.hh.sledj.net>
\r
31 User-Agent: Notmuch/0.19+53~gb45d2f9 (http://notmuchmail.org) Emacs/24.3.1
\r
32 (x86_64-unknown-linux-gnu)
\r
33 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
34 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
35 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
36 Date: Sun, 01 Feb 2015 23:42:48 +0200
\r
37 Message-ID: <m2y4ohtijr.fsf@guru.guru-group.fi>
\r
39 Content-Type: text/plain; charset=utf-8
\r
40 Content-Transfer-Encoding: quoted-printable
\r
41 X-BeenThere: notmuch@notmuchmail.org
\r
42 X-Mailman-Version: 2.1.13
\r
44 List-Id: "Use and development of the notmuch mail system."
\r
45 <notmuch.notmuchmail.org>
\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
49 List-Post: <mailto:notmuch@notmuchmail.org>
\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
53 X-List-Received-Date: Sun, 01 Feb 2015 21:43:13 -0000
\r
55 On Sun, Feb 01 2015, David Edmondson <dme@dme.org> wrote:
\r
57 > On Thu, Jan 29 2015, Jinwoo Lee wrote:
\r
58 >> It's default value is ".", meaning all remote images will be blocked
\r
62 >> This time setting gnus-blocked-images from the correct place.
\r
64 > Looks good - it is better than the code currently in the repository,
\r
65 > even if it doesn=E2=80=99t address every possible case that we have discu=
\r
68 That I can agree with :D
\r
74 >> emacs/notmuch-show.el | 23 ++++++++++++++++++-----
\r
75 >> 1 file changed, 18 insertions(+), 5 deletions(-)
\r
77 >> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
78 >> index 66350d4..6f38e0c 100644
\r
79 >> --- a/emacs/notmuch-show.el
\r
80 >> +++ b/emacs/notmuch-show.el
\r
81 >> @@ -136,6 +136,11 @@ indentation."
\r
83 >> :group 'notmuch-show)
\r
85 >> +(defcustom notmuch-show-text/html-blocked-images "."
\r
86 >> + "Remote images that have URLs matching this regexp will be blocked."
\r
87 >> + :type '(choice (const nil) regexp)
\r
88 >> + :group 'notmuch-show)
\r
90 >> (defvar notmuch-show-thread-id nil)
\r
91 >> (make-variable-buffer-local 'notmuch-show-thread-id)
\r
92 >> (put 'notmuch-show-thread-id 'permanent-local t)
\r
93 >> @@ -798,16 +803,24 @@ will return nil if the CID is unknown or cannot be=
\r
95 >> ;; URL-decode it (see RFC 2392).
\r
96 >> (let ((cid (url-unhex-string url)))
\r
97 >> (first (notmuch-show--get-cid-content cid)))))
\r
98 >> - ;; Block all external images to prevent privacy leaks and
\r
99 >> - ;; potential attacks. FIXME: If we block an image, offer a
\r
100 >> - ;; button to load external images.
\r
101 >> - (shr-blocked-images "."))
\r
102 >> + ;; By default, block all external images to prevent privacy
\r
103 >> + ;; leaks and potential attacks. FIXME: If we block an image,
\r
104 >> + ;; offer a button to load external images.
\r
105 >> + (shr-blocked-images notmuch-show-text/html-blocked-images))
\r
106 >> (shr-insert-document dom)
\r
109 >> (defun notmuch-show-insert-part-*/* (msg part content-type nth depth bu=
\r
111 >> ;; This handler _must_ succeed - it is the handler of last resort.
\r
112 >> - (notmuch-mm-display-part-inline msg part content-type notmuch-show-pr=
\r
115 >> + ;; By default, block all external images to prevent privacy leaks
\r
116 >> + ;; and potential attacks. FIXME: If we block an image, offer a
\r
117 >> + ;; button to load external images.
\r
118 >> + ;; Note that GNUS-BLOCKED-IMAGES is effective only when
\r
119 >> + ;; MM-TEXT-HTML-RENDERER is 'gnus-w3m.
\r
120 >> + (let ((gnus-blocked-images notmuch-show-text/html-blocked-images))
\r
121 >> + (notmuch-mm-display-part-inline msg part content-type
\r
122 >> + notmuch-show-process-crypto))
\r
125 >> ;; Functions for determining how to handle MIME parts.
\r
129 >> _______________________________________________
\r
130 >> notmuch mailing list
\r
131 >> notmuch@notmuchmail.org
\r
132 >> http://notmuchmail.org/mailman/listinfo/notmuch
\r
133 > _______________________________________________
\r
134 > notmuch mailing list
\r
135 > notmuch@notmuchmail.org
\r
136 > http://notmuchmail.org/mailman/listinfo/notmuch
\r