[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Code Request: CSV parser written in Lua
- From: erik@... (Erik Hougaard)
- Date: Thu, 23 Nov 2000 12:51:56 +0100
----- 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