From: David Edmondson <dme@dme.org>
To: Jinwoo Lee <jinwoo68@gmail.com>, notmuch@notmuchmail.org
Subject: Re: [PATCH] Add a defcustom for whether to block remote images by default.
Date: Thu, 29 Jan 2015 06:40:22 +0000 [thread overview]
Message-ID: <cunlhkm2ip5.fsf@gargravarr.hh.sledj.net> (raw)
In-Reply-To: <1422495572-40384-1-git-send-email-jinwoo68@gmail.com>
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
next prev parent reply other threads:[~2015-01-29 6:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-29 1:39 [PATCH] Add a defcustom for whether to block remote images by default Jinwoo Lee
2015-01-29 6:40 ` David Edmondson [this message]
2015-01-29 7:23 ` David Bremner
2015-01-29 8:58 ` Tomi Ollila
2015-01-29 17:31 ` Jinwoo Lee
2015-01-29 20:25 ` Tomi Ollila
2015-01-29 20:57 ` Jinwoo Lee
2015-01-29 21:39 ` Jinwoo Lee
2015-01-30 0:49 ` Jinwoo Lee
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://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cunlhkm2ip5.fsf@gargravarr.hh.sledj.net \
--to=dme@dme.org \
--cc=jinwoo68@gmail.com \
--cc=notmuch@notmuchmail.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.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.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).