From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qBh6Bic1WWMp/QAAbAwnHQ (envelope-from ) for ; Wed, 26 Oct 2022 15:24:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id QBW0BSc1WWO1VwAAG6o9tA (envelope-from ) for ; Wed, 26 Oct 2022 15:24:55 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C4F625EE4 for ; Wed, 26 Oct 2022 15:24:54 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ongG7-0007Xn-I2; Wed, 26 Oct 2022 09:15:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ongFj-0007We-Lk for emacs-orgmode@gnu.org; Wed, 26 Oct 2022 09:15:27 -0400 Received: from mail-ot1-x335.google.com ([2607:f8b0:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ongFg-0004Y9-AM for emacs-orgmode@gnu.org; Wed, 26 Oct 2022 09:15:26 -0400 Received: by mail-ot1-x335.google.com with SMTP id z11-20020a05683020cb00b00661a95cf920so9834664otq.5 for ; Wed, 26 Oct 2022 06:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=ygTcdflN5rYaJZHmINza5V6qYbq9alNyWC+JsXZ5zwU=; b=ZS+wO75/LdOD9xm3OeHg1ZnYABZ+SFIDHlclfw8579QZRjXiSEsch8MSN5xCYbt8Hq 3f83xORkxbrcpcpKNK4jFRSC4CZz0WmnOAo13uoAFeVELP4uhJb0nlg3U7ETu4Idc9J3 Y0FHf5Vb/cFcLRtK2csZfwHKTnVV0AhQW1Td6gyzlPI2gWKSDAaIXEd/CPeDJdRgyjCu sBCyLsvRoDKQvrq5TTJAIjK9y8KOEF4xaTx+SKcNCCKaX2MjOrs+cw2cU08zcMYdjGkR rI8f4EFsu4quvT7Lbvs4l+y10ndUyoSZEcH7NH72UgJv5nLYthkyqZ4yF3Mf8z7VK2fW 4gnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ygTcdflN5rYaJZHmINza5V6qYbq9alNyWC+JsXZ5zwU=; b=0SM849Y1525t9GxWHPSRJ4mcTn1zt7cq20et3YNP4wiN2ubZwSNDcXZYIyPzycxXE0 7D/r/n9xaEo2mIX4UBmaFzcICOYMc+3PcALM2yBQ1li2U44cQAkrHWWsvfUwmWaFjbWK IBgmkF35M1sVZYMVEPRYlsVKyOPcR30r+VemQSIB6VbqMqm+t3bNHn8xPBTDVBWmvEz9 YqoMU/zssl2uvKv0/RpoPZB0hCOu/Wlpo/k5D0QmsrDDnQAwfaQ3voiOkdzkSxtobj7i zcOniwEY0sTY2PKDEz/akXbGVLgFy1l6qBYsgW7dWgmgJESUHvKszUECoRPT68Q1vOyT 0XsQ== X-Gm-Message-State: ACrzQf1RedvwjQVvEH7H2yyDzkbeaBLKfC4f41PGap705D/jiR5JcWQZ 1ZmRcDe1raPHGppu09eZAqcecjKmR+22yt8Hkfs= X-Google-Smtp-Source: AMsMyM4uVkzXk5PjzQMrbCd6Iru7fklbTr+fohBzGQ5cCJCsWreEEwUTtzc7D0tLYAyaJ+BxZaC1eHVB2sgnbkCPDhQ= X-Received: by 2002:a05:6830:3c1:b0:637:28be:7920 with SMTP id p1-20020a05683003c100b0063728be7920mr21124455otc.105.1666790123013; Wed, 26 Oct 2022 06:15:23 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 26 Oct 2022 06:15:22 -0700 From: Stefan Kangas In-Reply-To: <87zgdjoz3r.fsf@localhost> References: <86bkq0qf8p.fsf@protected.rcdrun.com> <87bkq0t03l.fsf@web.de> <87v8o7qzff.fsf@localhost> <87zgdjoz3r.fsf@localhost> X-Hashcash: 1:20:221026:emacs-orgmode@gnu.org::/fIWn9Q3gGmRSWTb:3+Y/ MIME-Version: 1.0 Date: Wed, 26 Oct 2022 06:15:22 -0700 Message-ID: Subject: Re: bug#58774: 29.0.50; [WISH]: Let us make EWW browse WWW Org files correctly To: Ihor Radchenko Cc: "Dr. Arne Babenhauserheide" , 58774@debbugs.gnu.org, emacs-orgmode@gnu.org, bugs@gnu.support Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::335; envelope-from=stefankangas@gmail.com; helo=mail-ot1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666790694; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ygTcdflN5rYaJZHmINza5V6qYbq9alNyWC+JsXZ5zwU=; b=okGq5NXNVY59kVBCf+VuTDZlfrKVLJlCl6rduMuOsvALGD4rrXTtWrDla/XV/gPLGVATm4 bwueUvDyfPm6XgrtzP8GzkMw0qMUBaAXktfpl4hiF+DX5kp3WvISC6dNzTVwkjVxIPIcQD cdxep0++DGU8jIzxHDwTRyzbHD8JtD3u8KKRi8Va2J2mMTzFSNUbRiz8k0DHMP6lhRnfvZ e9AN6cW5Z1+i3CtuKzVR1+aqyZdei7BCXFgn5FVklaCrf94jkuioqzLP2XwG1UT+3z9bM5 GOKN4LsZhMgtvXBJncbIk+LrZ/Ozg9XPmmIuJHOYgMTl7kUVsWsqFZ4EmivbXQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666790694; a=rsa-sha256; cv=none; b=GkJZIDc9xwcxD+8fd76ZuP4utOGH6GLhFpR+LKH2nQnTXgqhPq5ddD2wNdPSZWSGFCZ2rp hRrTQnGr6JLIBUR7gFuT4/wP/cZEQKRrSM0fluf2QXUeq3D0k+tYsd2kd4CDTITGbPAK6x jVieWg6/dzQAUIpLEO+R3Ryyu0sMEROGIb8whT5OgyiiVFqhyy4m3xs1QsoMTi3OoHhB5Y OKd2sITeCUtvil3UtYncLDjnLBUDqUBjV0tRU3mqCHCd1kxD9TdZKr/b4M1gKQg9G+8fi4 sHIzJ4OtmqRDlVyEutYzCNfbLsQoT1iQB6vqOgi1eRmmruQHW5CaYUYcsOjCdA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="ZS+wO75/"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.42 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="ZS+wO75/"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C4F625EE4 X-Spam-Score: -2.42 X-Migadu-Scanner: scn1.migadu.com X-TUID: 1roz9hagcBem Ihor Radchenko writes: >> Note that with the suggested feature, any link you follow risks being >> loaded in Org mode, before the user even has a chance to inspect the >> file. Which Org features, currently existing or introduced in the >> future, would EWW have to add workarounds for? > > That's not the case. Org never loads arbitrary code on loading the file > without querying the user. We seem to be miscommunicating. In the above, I was merely referring to whether org-mode is run when visiting some URL or not, which AFAIU is a binary thing (it either does, or it doesn't). You seem to be talking about security features in org-mode itself, which is related, but not the same thing. I agree that there are various security features in org-mode. I still don't think that we should run org-mode just because some URL requests it. To reiterate what I said, security problems are hard to audit and discover. We shouldn't expose users to additional risks just to add such a minor convenience feature. It is not a good trade-off. > Strictly speaking, even eww-mode may run arbitrary code given that user > puts something into eww-mode-hook. My concern is not that the users should run their own code, but that they will inadvertently run (potentially malicious) code provided by others. > I'd say that it will be safer to take care about necessary precautions > rather than leaving the user with the only option to run org-mode > manually. Adding a `safe-org-mode' would be an improvement, but orthogonal to whether or not we should automatically load org-mode when visiting any URL that presents itself as serving an org file. I think we should not do the latter. > If necessary, we can introduce a special variable in Org mode that will > disable all the potential third-party code evaluation, even if user has > customized Org to execute code without prompt. That would also be an improvement, yes. It would be even better if such a variable supported whitelisting, so that users could mark only specific files as safe for these purposes.