From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28647 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Add a flag/option to disallow all network access? Date: Thu, 17 Jun 2021 13:08:59 -0700 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13010"; mail-complaints-to="usenet@ciao.gmane.io" To: Michael Weiss , pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBB2GXV2DAMGQEWVUECUA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jun 17 22:09:15 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qv1-f57.google.com ([209.85.219.57]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ltyKA-00039z-Kg for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 17 Jun 2021 22:09:14 +0200 Original-Received: by mail-qv1-f57.google.com with SMTP id jm5-20020ad45ec50000b0290219dc9a1ab8sf3295907qvb.21 for ; Thu, 17 Jun 2021 13:09:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1623960553; cv=pass; d=google.com; s=arc-20160816; b=ijryuZrmWfwVwJRs/Pt4J/wqiPyza0muDYEYNdbe9mFkkdB4shaWhj2fr0EWjGu5oU NbkF/M26muZVlpasMNLgYZT/VvSg4AYNIQqJxIAyxhEFIFc0VWhPGIKgxiCJsY1rBv4G axGq+X7z5RndtXmb4JmEB85U5/4LlinuoPhrAJl6Nijb8TXDzUFP46vu9LQ5DkszfJRI Qsd5goM5QB/XGoMjDtvajXJYafv1JctnS80GLflzRKrqJLK7GUuiOB8B0hcjgLCABdqm 5sl17BdPzFKC54zvQ7s0F5ccitpc93R7G0G6fhnkSsIBhNEoY/RPf7jLfJiQoL2Sw4bm vEuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:message-id :date:references:in-reply-to:subject:to:from:sender:dkim-signature; bh=yAo/MVQ/deSvsnEtrWWica+cciNAinZeUHJhBJId5yo=; b=gyIwZJQp/rEuM9N5fIYdSEaOODI36Au10zT5LGDvxONH/S8Z++ak4pGr9dyXX9g+z9 Zqd7NYMGvbUBHkdcC7hTKLU3MEHrt+fcw+qm6TZlLaMaRfovzWP5E4DGZV/Y+nPmA6zX 1ixHkngbB7kir1Iq7n1dUNPdL1fsrIlZUOjxvEjKzI8IyX4yX3hUQt+22OWH8Npsx6GU UxF56TjcNS8JXvKADkKmKndDX7mwGoHt5n6iPsNdzTfrFMWQSDNI4/tnWTE7hmWrQe+m rb4mq1C3KaqkPd3PvTsdoD1tWP/mxvssVYrTdvLbYA5Nk4xjd4YUEx7cSnhQJFQdQDyb fd3A== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=KNL6ZSjI; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::630 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=yAo/MVQ/deSvsnEtrWWica+cciNAinZeUHJhBJId5yo=; b=oulUMc6liLhJ4J6W2+Zr1oHLzjTUjmITlsbOdhDj1LNR6fe9yHBtQkr4STD/EITrCF 2XckyRi8KJDrrswl3UK/M1cBgAnh2Y7odHnSD3IC/ZDTMv94QtQcK86TAoRW0EgbQoeT puFquHm7S0n1cJHXbdp9HNvmzgcxtmEtXnPtlV+g0Xlj7Zx3pDBOnpxiHSiwi1A/6IXL fmLB9W5ErrJxrDO2xZKjVOI+1YyaI84e6Ths5fJ2TQFAfQd7Th4Am8pAmq77vLDLTdho abke21MKebpHw5RKSgKxS30+85CHcReSlQAmjg0/3FxWQUoNA8sTYtJYHyVoQdC/GeKW IbSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=yAo/MVQ/deSvsnEtrWWica+cciNAinZeUHJhBJId5yo=; b=g7XAdCEDuqHzKWExjKrmUnjnN6RXULoBGNoAmPBWk183JCEkqQkFDjIJdK/7LYyIB2 kB5J6/33T/g3lBLngpQVpAEwbJA30Seotmv0f33op++u6iOZX0Rb4BcNMe35npM7GAOn 3qNvK6LroDMwnXlgrHg2v42Spynb/nv1rDDTFtTZ92rTeUVyHo2uGnalxgWrvVa7dc/H GjbKxoxxD7XFFVr7Kv3so3GNbI8EUO4F0hakoEkza77hQxA+qAwyhE+nMrmH5ji3MY4F P8JTT8NuSwyd9R83PjJQjo8iEuLnJEsxEeAFNaxfj7WQJcQxtv1l7h9pqSAszBQtAaAs /eBA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533TLeBB5hO4ynv44YYQ4wzzqXWA0fl7BSUZWSC2YanOznmQlpi4 kG6aemmuI5nO/Bh/YwyHVxA= X-Google-Smtp-Source: ABdhPJyl8ppt/gFoeILuq+nKaaWmB35sDQGpHd4rha+8X7Tvb6u+PoRUuAcFKJp7tvVJ98cbmHom7A== X-Received: by 2002:a37:91c7:: with SMTP id t190mr4275328qkd.282.1623960553769; Thu, 17 Jun 2021 13:09:13 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ac8:5cd5:: with SMTP id s21ls3890172qta.10.gmail; Thu, 17 Jun 2021 13:09:12 -0700 (PDT) X-Received: by 2002:ac8:4e93:: with SMTP id 19mr6940993qtp.202.1623960552326; Thu, 17 Jun 2021 13:09:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623960552; cv=none; d=google.com; s=arc-20160816; b=tpnOSk6wuwDhoQrQVcKQlYtE0kpzCJqlZeK+MDsq2p+igpUsx9oHh47SsQHjjYR4WB 07qLl15pb1bupknX5mb2YfSa8s7qnjiBMcEGWgP5iQcybSmZIavJIH7pZLo6sawIWMLQ eRKzH9tWQPVy49DEgL2m/K7H8j64bzyuRwHE3HTbn1/CwmUHzgG/3TpBtF0pjgfF2pCS HhJXxLwdTLyf+7pDI3c0WYVGSJMajqBcwPAOZcoWJjIUFLs6h7cB7HVqR8107/rYdcoQ rBxoRJj9w+EjzOKyO9V5NSr0/LtX7/BWmwMdDoLdEdxSmCWQNsJA1hVGMOlxR4RbGu6L brig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :dkim-signature; bh=P60S9JkW/9+KeCR1aL9Sb3OtQgVdJThNVG6yd5fgf6U=; b=TajiZKO7SnV/aCR/FD2XcNEL1JV0GY/oNyh7/BR0T62GnY0m7m6vbmbqJ9/V2O8JfQ v8td2tKiOdsCpFu4N30G5PwA5pjXW4M4CP7ajNR6Cl3S3Kdz9WTEIrk5FZi4HL4khOSp qs2l9wUu8kPFpU49BoirTQXY4NhUHKt10zUGrZwlNwExIh32K5NiJ4TyUf7Sma95sUxP rCXry1bxbPiKl4MgQP+1LOO2E9UD5rPCZjBkBt23pmShSTv7P9qYSI7PuvHj278UAxUL ses87ibKafIukCClcuLwFX8wOhKmsHSPwcxhhCqin1eM5nVo1cB6waTM7bsx3duKwuUs QWcA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=KNL6ZSjI; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::630 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com. [2607:f8b0:4864:20::630]) by gmr-mx.google.com with ESMTPS id o23si315500qka.0.2021.06.17.13.09.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Jun 2021 13:09:12 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::630 as permitted sender) client-ip=2607:f8b0:4864:20::630; Original-Received: by mail-pl1-x630.google.com with SMTP id h1so3533856plt.1 for ; Thu, 17 Jun 2021 13:09:12 -0700 (PDT) X-Received: by 2002:a17:90a:e553:: with SMTP id ei19mr7232146pjb.3.1623960551259; Thu, 17 Jun 2021 13:09:11 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id h24sm5993518pfn.180.2021.06.17.13.09.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jun 2021 13:09:10 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id AB266A23E; Thu, 17 Jun 2021 16:08:59 -0400 (EDT) In-Reply-To: X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=KNL6ZSjI; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::630 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:28647 Archived-At: Yes, I've been wanting to do something like this. https://github.com/jgm/pandoc/issues/5045 Michael Weiss writes: > I currently use Pandoc for a somewhat strange(?) use-case: Converting > HTML-only emails to plaintext so that I can read them in Mutt. > I've used a text-based web browser for that in the past but recently > switched to Pandoc because it is better maintained, I trust it more to > securely parse untrusted/arbitrary HTML input [0] (is that correct or > are there any risks?), and most importantly I assumed Pandoc wouldn't > fetch any links, images, style sheets, etc. which would avoid any > tracking and therefore improve privacy. > > So far this has worked very well :) > However, when I tested this setup via Email Privacy Tester [1] I noticed > that Pandoc still leaks my IP address (obviously also revealing when I > open/read the mail) by fetching an Iframe [2]. > > Knowing this I'm wondering if it would make sense to add a flag/option > to disallow any network access (ideally this would even be fairly simple > to implement but I'm not familiar enough with the code / Haskell). > Maybe this is even already possible via the PandocPure [3] monad? > Nonetheless it would be nice to have a CLI option/parameter like > --no-network-access (or even something like --sandboxed or --no-io to > disallow other types of IO as well). > > What do you think of this feature request? > > Kind regards, > Michael > > PS: For my use-case I've noticed that I can avoid this issue by enabling > the raw_html extension (found that in src/Text/Pandoc/Readers/HTML.hs > but it's likely not ideal either although it does at least seem safe for > my use-case(?)). I.e. I use the following now: > text/html; pandoc --from=html+raw_html --to=plain | less > text/html; pandoc --from=html+raw_html --to=plain; copiousoutput > > PPS: And thanks for Pandoc btw! It's such an awesome project that I use > for years now. > > [0]: https://pandoc.org/MANUAL.html#a-note-on-security > [1]: https://www.emailprivacytester.com/ > [2]: https://www.emailprivacytester.com/testDescription?test=iframe > [3]: https://pandoc.org/using-the-pandoc-api.html#the-pandocmonad-class > > -- > You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/YMt1w2fD9xNcxSVi%40jarvis.primeos.dev.