lua-users home
lua-l archive

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


Luiz Henrique de Figueiredo wrote:
And by the way, is this way of concatenating 100% safe of any code
injections? Can only "]]" end string beginning with "[["?

There is no 100% safe way the way you are doing it

Sure there is: find the largest sequence [===...===[ in the user code and
wrap it with one more '='.

Thanks, that's exactly the solution i was looking for.
And now I can see it in the 5.1 reference manual :)

I know it is a detail but to be precise in case someone will read it someday I have to look for the longest "]==..==]" sequence (closing not opening).

Best regards and thanks, francio