On 27/10/2022 11:55, Jean Louis wrote:
Now is clear that main problem here is that Org advertises somewhere
to be "text" in MIME context, while it is not, it is by default
"application" and thus unsafe, see:
...
Text Media Types
https://datatracker.ietf.org/doc/html/rfc6838#section-4.2.1
I do not see any problem or any difference what MIME type you are going
to associate with Org mode. I agree with Arne that text/... type is more
appropriate for a format readable as text. I do not see any
contradictions with that RFC.
"Org Mode
Your life in plain text"
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. I have not
managed to configure Firefox to achieve the same behavior that allows to
avoid an external application (certainly not Emacs at first).
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.
Your are pushing Org to rather hostile environment: highly automated
attacks to distribute exploits, market of breached computers listening
for remote commands. 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.
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.
Consider converting Org files to HTML as an unpleasant tax for the sake
of safety.
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?
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.