RiscLua and ZeroPain
GavinWraith (26) 1563 posts |
RiscLua lets you write applications whose users can input strings and run them as code. However, you can put the user’s input in a sandbox, so that it does not do naughty things like poking the zeropage. This is because of RiscLua’s reflexive facilities; the interpreter itself can be modified by the program it runs. But the modifications can be locked, so that the user’s input cannot itself carry out further modifications. For example, the code is equivalent to BASIC
, which would certainly be undesirable in the user’s code. But this
will lock the ! operator so that trying to use ! to poke in the zeropage will raise an error:
Trying to tamper with !’s behaviour will also raise an error – forbidden!. Seeing the discussions about BASIC and ZeroPain, and how BASIC might be modified I thought this might give some pause for reflexion (pun intended!). |