unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: 44837@debbugs.gnu.org
Subject: bug#44837: 28.0.50; Local-variables: in middle of file wants to get executed
Date: Tue, 24 Nov 2020 12:54:25 +0300	[thread overview]
Message-ID: <courier.000000005FBCD853.000073BD@static.rcdrun.com> (raw)


How to reproduce:

- make email with the text containing Local-variables as below.

-------------------- text begin below-----------------------
* Eric S Fraga <e.fraga@ucl.ac.uk> [2020-11-24 12:46]:
> On Tuesday, 24 Nov 2020 at 12:00, Jean Louis wrote:
> > Can I automated the execution of Babel code upon opening of the Org
> > file?
> 
> You can, by using file local variables.  For instance, for some files, I
> do this:
> 
> #+begin_src org
>   ,* local variables                         :noexport:
>   # Local Variables:
>   # eval: (org-sbe "startup")
>   # End:
> #+end_src
> 
> which will evaluate the named src block "startup" when file is opened.
> 
> Note that this is a potential security hole so only do this for files
> you trust!

For me is fine, as I do that for files I create.

When I have opened this email i was also asked to set local variables,
imagine. So that could maybe also mean that one could send email that
is constructed as Org file and if user answers YES, one could inject
malicious stuff.

--------------- the text above -------------------
still asks me if I like to allow eval: (org-sbe "startup")

So I think this is bug in Emacs as Local-variables should be on the
end of the file.

I am asked when editing such email to execute those local variables
above quoted even though they are not on the end of the file. I think
this is security issue as described above in the same file. People
could spam other users, include some local variables and those
answering with Emacs could send them their email addresses, or
passwods or other private information, it could also invoke various
modes like Org mode and execute various scripts.

-- 
Thanks,
Jean Louis
⎔ λ 🄯 𝍄 𝌡 𝌚





             reply	other threads:[~2020-11-24  9:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24  9:54 Jean Louis [this message]
2020-11-26  5:47 ` bug#44837: 28.0.50; Local-variables: in middle of file wants to get executed Jean Louis
2020-11-26 11:15 ` Lars Ingebrigtsen
2020-11-26 12:35   ` Jean Louis
2020-11-26 12:54     ` Lars Ingebrigtsen
2020-11-26 18:42       ` Jean Louis
2021-09-08  9:46         ` Lars Ingebrigtsen
2022-05-02  8:47           ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=courier.000000005FBCD853.000073BD@static.rcdrun.com \
    --to=bugs@gnu.support \
    --cc=44837@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).