[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Safe mode is not so safe

From: Juergen Sauermann
Subject: Re: [Bug-apl] Safe mode is not so safe
Date: Wed, 29 Mar 2017 17:40:34 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hi Elias,

I understand and to some extent support the desire to make the safe mode more
safe. However, we should not go too far with it because
that has the risk of making --safe so restrictive that useful operations are no linger possible.

For example disabling SQL operations completely would make it impossible to display data from an SQL file in a web page.
I would rather argue that in this example, setting the file permissions of the SQL files would be more appropriate than disabling SQL
entirely. I also tend to believe that it is simply impossible to implement the security of a machine as a single command-line option
of one program.

And e.g. preventing )COPY would render many existing workspaces useless. For example, my own HTML pages do )COPY HTML
before anything else. Preventing ⎕FIO would also disable socket() operations which are quite useful if you want to do a web server
directly in apl.

So lets discuss what a reasonable list would look like, and then (based on the length of the list) how to implement the restrictions
(via ./configure, or in preferences files, or as command line option(s)).

Best Regads,
/// Jürgen

On 03/29/2017 06:21 AM, Elias Mårtenson wrote:
I'm implementing an IRC bot that can run arbitrary APL expressions. Since this bot can run code submitted by anyone, I need to ensure that the code can't affect the system where the APL expressions are executed.

This is the purpose of the --safe flag, but I have noted that several destructive operations are still permitted when using this flag.

In particular:

  • SQL operations
  • )OUT
  • )COPY, )LOAD, etc…
  • )HOST
There is probably more, but preventing these would be a good start.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]