unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#44837: 28.0.50; Local-variables: in middle of file wants to get executed
@ 2020-11-24  9:54 Jean Louis
  2020-11-26  5:47 ` Jean Louis
  2020-11-26 11:15 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 8+ messages in thread
From: Jean Louis @ 2020-11-24  9:54 UTC (permalink / raw)
  To: 44837


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
⎔ λ 🄯 𝍄 𝌡 𝌚





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-05-02  8:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24  9:54 bug#44837: 28.0.50; Local-variables: in middle of file wants to get executed Jean Louis
2020-11-26  5:47 ` 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

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).