From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs,gmane.emacs.orgmode Subject: bug#58774: 29.0.50; [WISH]: Let us make EWW browse WWW Org files correctly Date: Wed, 26 Oct 2022 06:15:22 -0700 Message-ID: References: <86bkq0qf8p.fsf@protected.rcdrun.com> <87bkq0t03l.fsf@web.de> <87v8o7qzff.fsf@localhost> <87zgdjoz3r.fsf@localhost> 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="6722"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58774@debbugs.gnu.org, "Dr. Arne Babenhauserheide" , emacs-orgmode@gnu.org, bugs@gnu.support To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 26 15:23:11 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ongNB-0001S6-Ua for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Oct 2022 15:23:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ongGL-0007um-1d; Wed, 26 Oct 2022 09:16:05 -0400 Original-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 1ongGJ-0007tz-9r for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 09:16:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ongGI-0004er-8J for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 09:16:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ongGI-0000RK-3g for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 09:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Oct 2022 13:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 58774-submit@debbugs.gnu.org id=B58774.16667901321647 (code B ref 58774); Wed, 26 Oct 2022 13:16:02 +0000 Original-Received: (at 58774) by debbugs.gnu.org; 26 Oct 2022 13:15:32 +0000 Original-Received: from localhost ([127.0.0.1]:53677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ongFn-0000QV-N4 for submit@debbugs.gnu.org; Wed, 26 Oct 2022 09:15:32 -0400 Original-Received: from mail-ot1-f49.google.com ([209.85.210.49]:43686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ongFk-0000QB-R2 for 58774@debbugs.gnu.org; Wed, 26 Oct 2022 09:15:30 -0400 Original-Received: by mail-ot1-f49.google.com with SMTP id t4-20020a9d7f84000000b00661c3d864f9so9817875otp.10 for <58774@debbugs.gnu.org>; Wed, 26 Oct 2022 06:15:28 -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=MFLMWBNibzIsz1N1CNAoWuHfa2EEjyOrKaFNT0mnf4alSIECvqkwra8Gr3PujtoTef 5a9g5EiDXJgeRq6x4IFpUNZhSAnYykFjUS/BjAan5zlZqTptlmQJg8//wMMkxA6G+j1v k5pmShrzSWY/yIBfO0JGYzhuZohxL1WYGmaaHwg+uxyLd+85jcrdX63ATwjGxklKUgbJ zo0F3TzZ7I/u1lk8N4wNTX77royGqvXK9UQCyl6uS8qyQ/MralMyaRYyzFdT3mAg107p T1LNuJ4GOHnIwHuMMGRXK7+h5zHXX8H0d+BJ2py+M2EbuQy8gaFu/s7O55/B6GmNMaP1 C6JQ== X-Gm-Message-State: ACrzQf1VmyOqjckvynUEuHnBrJQv55EaQszuVQKQkfMDPv0+/M1rRjfV cy04kGbHLwSYsAl9L5w2akSCG8BeCqOc/4KlQv8= 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) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 26 Oct 2022 06:15:22 -0700 In-Reply-To: <87zgdjoz3r.fsf@localhost> X-Hashcash: 1:20:221026:emacs-orgmode@gnu.org::/fIWn9Q3gGmRSWTb:3+Y/ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246226 gmane.emacs.orgmode:149938 Archived-At: 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. 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.