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 0LqpDGvbWmP/OwEAbAwnHQ (envelope-from ) for ; Thu, 27 Oct 2022 21:26:35 +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 8MgNDGvbWmM1pgAAG6o9tA (envelope-from ) for ; Thu, 27 Oct 2022 21:26:35 +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 ACD73A1DA for ; Thu, 27 Oct 2022 21:26:34 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oo8Pc-0003Bl-UP; Thu, 27 Oct 2022 15:19:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oo8PA-00030c-BL for emacs-orgmode@gnu.org; Thu, 27 Oct 2022 15:19:04 -0400 Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oo8P8-0001Zw-7p for emacs-orgmode@gnu.org; Thu, 27 Oct 2022 15:19:04 -0400 Received: from localhost ([::ffff:102.85.119.94]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000081FC2.00000000635AD9A6.000042E4; Thu, 27 Oct 2022 12:19:01 -0700 Date: Thu, 27 Oct 2022 21:25:49 +0300 From: Jean Louis To: Max Nikulin Cc: 58774@debbugs.gnu.org, Org Mode List Subject: Re: bug#58774: 29.0.50; [WISH]: Let us make EWW browse WWW Org files correctly Message-ID: Mail-Followup-To: Max Nikulin , 58774@debbugs.gnu.org, Org Mode List References: <86bkq0qf8p.fsf@protected.rcdrun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.2.7+37 (a90f69b) (2022-09-02) Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-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=1666898794; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=dv10W4X6v+eqNbuzK18vhGi0iUqOcqEudYq0Nf+kHJ0=; b=lcErFCpQxqJyBtYL71+aQi73uFqZvZml7tHU47lDF3t7DgvRg4ZOBQs02aGhmiweztBQnT e7kKBBZ7NENW6eRe/XThoD6Tkqm/yz2iptJHx6netT6crytzAP0XsQbRZiY16o1x4yBCf3 uERitdOdrnAedo41T3/tS1jAohVmZAToqKRyo986ymqHbIJOqm5vrNNy+8N06MMWfvcu2r icFGMk7B7T6FAwyC1J1W4e4UZdpe/nSedEVRmHX976GhM4Jr/5CYAogAgm/S1ChLFRHZUg l13fw/e8KzMwzQW7hLnNOdtDF1NCIo5xHcIn4Sn7FIKo1k8YvYSqNsDq1PyuCw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666898794; a=rsa-sha256; cv=none; b=hEy4uAyT0PDgHNTtzn7nWlc+FkQ82V3eV4kJd/lspFguUlieQao5ambf7arg7tEbvz90Gj +RX+pYt5ZPkLKoi3xhsCBY6f+owpD+YOh84tm8dtkDVzGemSmfBaJPuzzkCmDybU/Q7wWN wy6j8dxi9qEh/kKTspQsPnGgixfAe7T8cHf20NePHYI+obmKcR7ZYEXzG7196K3TeYKaL0 lw6AsIMjbQjLJ6MGJR1KAeJRuA3OjOFmWfI/qnbsQdaPYTPiFxRRMMNZqm6JOwr1IL+5ov s4IybvEgKtXhvAoOW5hooz+Zbp+d+S8vFx//rOSRnOm5olElIReOuvzBDXF/Ew== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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: -1.21 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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: ACD73A1DA X-Spam-Score: -1.21 X-Migadu-Scanner: scn1.migadu.com X-TUID: ubxyXL0muFK/ * Max Nikulin [2022-10-27 18:41]: > Chromium is able to display text/x-org internally just as text/plain and I > like it as a way to preview and review file contents. Org file is for Emacs. It is not for Chromium. Just as you can display application/json in Chromium as text, does not make application/json less "application/*" MIME type. Displaying Org in Chromium is useless, as I cannot use Org features, Chromium is not for that, and it's not suitable example. Suitable example is that Chromium may be configured to open Org file correctly with Emacs and as you have mentioned, there will be executions. > I have not managed to configure Firefox to achieve the same behavior > that allows to avoid an external application (certainly not Emacs at > first). I wonder on which mailing list I am. Of course I want Org file be opened by Emacs. I am user of Org files and Emacs. I am not vim user (unless Emacs flunks). > > We can't just speak of safety alone when we are in general > > computing environment, we must also speak of usefulness. > > I do not mind to have org-view-mode that saves me from execution some code > unintentionally. Since most of the code was written without having in mind > such feature, I expect a lot of iterations before all possibilities to run > code will be plumbed. I suspect that it is possible to ruin whole protection > by a small piece of elisp code. I am unaware of sandboxing in Emacs. I > expect that making Org mode safe enough will require a lot of efforts by > developers. Exactly. > Your are pushing Org to rather hostile environment: highly automated > attacks to distribute exploits, market of breached computers > listening for remote commands. Tittle-tattle. 😵‍💫 But America has been already discovered. Remember, any type of application, software, is already for billions of times delivered by Internet and executed on user's devices. Flatpak, APK, EXE files, Java, shell files, hoooooo, too long list. And where we are now? In Emacs world, where packages are distributed from all kinds of sources and executed on users's computers. "Pushing Org" to rather hostile environment is exaggeration. > A running cryptominer would be rather innocent consequence, through > the same backdoor you may receive an encryptor or various stuff > searching for credentials and access tokens in your files. Of course I understand that. Do you wish to say that users should not have the freedom to customize web browser to click on Org file and open it with Emacs? Are we not on Emacs related mailing list? If I am pushing Org into hostile environment, than you are implying that we as Org users are hostile environemnt. Are we really? > Emacs is protected mostly by its low popularity. A lot of efforts > have been invested in browser making attacks more expensive, but > still attractive due to possible benefits. I do not like to increase > surface for attacks. Someone may create a plugin targeting Emacs > users just because it would be easy enough. And? > Consider converting Org files to HTML as an unpleasant tax for the > sake of safety. Personally, definitely not. Such files do not give me freedom to work with my Org data. It is way of presenting things, not handling it. > > All I want is to access my personal read-only Org files by using WWW > > and browse from one to the other by using links. > > How are you going to distinguish your personal files and arbitrary files > from non-trusted sources? By signing your files and maintaining list of > trusted certificates? 🤣 Am I Joe Biden or other gaga that I do not know what are my files? > For personal notes I would expect e.g. private instance of nextcloud > file share (that is internally HTTP server), not accessing files > directly through HTTP. HTTP is transfer protocol, not my mamma to tell me what I am going to transfer in my room. Nextcloud is application that runs on computer and is served by web server. It allows file share to public as well. I understand your point of protecting private files on web server. That shall be natural to every person hosting such files. Nextcloud is bloated way to do such hosting. Simplest way to protect files is to upload files and use web server authentication. And web server does not mean that files are distributed on public WWW. We use here ethernet, and we share files from device to device by using HTTP server. You can't access those files, they are beyond public IP address space. I need help to make it work right, can you help? I load this: (defvar eww-content-type nil) (put 'eww-content-type 'permanent-local t) then I put this below in `eww-render' after (let ;;; (setq eww-content-type content-type) Then I use this: (defun rcd-eww-content-type () (cond ((string-match-p "text/x-org" (car eww-content-type)) (org-mode)) (t WHAT-HERE?))) (add-hook 'eww-after-render-hook 'rcd-eww-content-type) But I am doing it wrong, that will correctly invoke org mode, but then it does not return back to normal EWW work. I have tried to remember the major mode and invoke it again. But it is not that it works. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/