lua-users home
lua-l archive

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


----- Original Message -----
> >Quick and dirty method I use:
> >
> >     dostring("fields={" .. the_line .. "}")
>
> This is nice!
>
> A simpler solution is
> fields=dostring("return {" .. the_line .. "}")
>
> But of course you'd have to trust "the_line".
> An attacker could use "}, execute'rm *', ={" as "the_line" ...
> --lhf

But the correct syntax for a embedded " is "" and Lua will not parse that
correctly :-(

/Erik