From cf14df98293ae68e1db80cbe92ef5ec2ba136282 Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Thu, 29 Jan 2015 06:40:22 +0000 Subject: [PATCH] Re: [PATCH] Add a defcustom for whether to block remote images by default. --- 34/bfa38768faa71fdd8d55960d63893ca3872a2c | 121 ++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 34/bfa38768faa71fdd8d55960d63893ca3872a2c diff --git a/34/bfa38768faa71fdd8d55960d63893ca3872a2c b/34/bfa38768faa71fdd8d55960d63893ca3872a2c new file mode 100644 index 000000000..4a18ac278 --- /dev/null +++ b/34/bfa38768faa71fdd8d55960d63893ca3872a2c @@ -0,0 +1,121 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 1B99A431FBC + for ; Wed, 28 Jan 2015 22:40:33 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 1.739 +X-Spam-Level: * +X-Spam-Status: No, score=1.739 tagged_above=-999 required=5 + tests=[DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_LOW=-0.7, + UNPARSEABLE_RELAY=0.001] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id G3OH2yBobrtn for ; + Wed, 28 Jan 2015 22:40:28 -0800 (PST) +Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com + [209.85.212.178]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 9BF84431FAF + for ; Wed, 28 Jan 2015 22:40:27 -0800 (PST) +Received: by mail-wi0-f178.google.com with SMTP id bs8so11508419wib.5 + for ; Wed, 28 Jan 2015 22:40:25 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:to:subject:in-reply-to:references:user-agent + :from:date:message-id:mime-version:content-type; + bh=Ffm+dfdb9FmRP51nsCfoDYIBhKq7qLbRdC2k7QOHrsg=; + b=U3MXWikKW/NfQd/aZaCy2ik/YbQCTv6S2LrCm3Qu0ftLicpEGSPc3T0U4qGBSRwAHC + artSej6E4bKLyqOduqcq8eQs6qvMMUQTYitOx5lzl6OfzyY/6QyZf3apPjSXDJLIqJfk + I0Dpc+lXpwL0s2+f1raTQO5gBXNTGJ+QfA9L1Ir7fuc4ZmGIk6fxmVQbhyttHtaAIfKu + tuNQ3xW71Qcd1nGD1JVvd7SwM93z6duPyCyx7h47uhUtiHthVHjHZC4abbVyML+Hj+TE + jx3oPLYcP62W3bd3uESZSRoqG/xIQOVQKfW1n6xpMkegnJLZieOTi0di1vX1LLv754BJ + rUnQ== +X-Gm-Message-State: + ALoCoQksHCa4OzY/9Co0b1QeX7wyXRToO8yE7o6dC+YGLqS4Quu/tt8lAAyONXCUSW/M4MOqPI5v +X-Received: by 10.180.92.231 with SMTP id cp7mr1244255wib.24.1422513625066; + Wed, 28 Jan 2015 22:40:25 -0800 (PST) +Received: from disaster-area.hh.sledj.net + ([2a01:348:1a2:1:ea39:35ff:fe2c:a227]) + by mx.google.com with ESMTPSA id be2sm9063980wjb.38.2015.01.28.22.40.23 + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Wed, 28 Jan 2015 22:40:24 -0800 (PST) +Received: from localhost (30000@localhost [local]); + by localhost (OpenSMTPD) with ESMTPA id 00f16893; + Thu, 29 Jan 2015 06:40:22 +0000 (UTC) +To: Jinwoo Lee , notmuch@notmuchmail.org +Subject: Re: [PATCH] Add a defcustom for whether to block remote images by + default. +In-Reply-To: <1422495572-40384-1-git-send-email-jinwoo68@gmail.com> +References: <1422495572-40384-1-git-send-email-jinwoo68@gmail.com> +User-Agent: none +From: David Edmondson +Date: Thu, 29 Jan 2015 06:40:22 +0000 +Message-ID: +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Thu, 29 Jan 2015 06:40:35 -0000 + +A defcustom for `notmuch-show-text/html-blocked-images', which is used +to set `shr-blocked-images', would be more usable. It can default to "." +to achieve the same result. + +On Thu, Jan 29 2015, Jinwoo Lee wrote: +> --- +> emacs/notmuch-show.el | 15 +++++++++++---- +> 1 file changed, 11 insertions(+), 4 deletions(-) +> +> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +> index 66350d4..bc48922 100644 +> --- a/emacs/notmuch-show.el +> +++ b/emacs/notmuch-show.el +> @@ -136,6 +136,11 @@ indentation." +> :type 'boolean +> :group 'notmuch-show) +> +> +(defcustom notmuch-show-block-remote-images t +> + "Block remote images by default." +> + :type 'boolean +> + :group 'notmuch-show) +> + +> (defvar notmuch-show-thread-id nil) +> (make-variable-buffer-local 'notmuch-show-thread-id) +> (put 'notmuch-show-thread-id 'permanent-local t) +> @@ -798,10 +803,12 @@ will return nil if the CID is unknown or cannot be retrieved." +> ;; URL-decode it (see RFC 2392). +> (let ((cid (url-unhex-string url))) +> (first (notmuch-show--get-cid-content cid))))) +> - ;; Block all external images to prevent privacy leaks and +> - ;; potential attacks. FIXME: If we block an image, offer a +> - ;; button to load external images. +> - (shr-blocked-images ".")) +> + ;; By default, block all external images to prevent privacy +> + ;; leaks and potential attacks. FIXME: If we block an image, +> + ;; offer a button to load external images. +> + (shr-blocked-images (if notmuch-show-block-remote-images +> + "." +> + shr-blocked-images))) +> (shr-insert-document dom) +> t)) +> +> -- +> 2.2.2 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2