lua-users home
lua-l archive

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


but rawset is no lua command (it is C interface command) ... so a user
will NOT be able to access rawset.

... sorry, how funny... I just recognized that there is really also
lua command rawset in base lib.

Yes I am frightened you will have to forbit access to rawset (you have
to define some empty function or error function err_rawset or so and
then apply "rawset= err_rawset" in your Lua environment, before user
gets access to Lua).


On Wed, Jan 19, 2022 at 3:11 PM Meir Shpilraien <meir@redis.com> wrote:
>
> Thanks for your reply, I was thinking of doing it but wouldn't a user can still use rawset to forcely set 'A1' to the global table and then my metatable '__index' function will not even be called when fetching 'A1'?
>
> On Wed, Jan 19, 2022 at 3:58 PM Flyer31 Test <flyer31@googlemail.com> wrote: