Nmap Development mailing list archives

Re: NSE pathnames with backslash character error message bug


From: doug () hcsw org
Date: Sun, 27 Jan 2008 16:17:47 -0800

Hi all,

On Tue, Jan 22, 2008 at 05:30:05PM -0800 or thereabouts, doug () hcsw org wrote:
The most straightforward solution I can think of right now is to
escape backslashes (and, I think, characters like ' and ") for user
controlled data before it is passed to lua.

This issue should be resolved in SVN. There is a new function in nse_init.cc:

// Takes a string and converts \, ', and " characters so that
// the string is suitable for embedding in a Lua ' or " string.
// Remember to free() when finished

char *make_lua_escaped_string(char *str)

I went through NSE and looked for other instanced of this Lua
escaping bug and didn't find any. If we do, or if we need this
function in the future, we can make it public.

Best,

Doug

Attachment: signature.asc
Description: Digital signature


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Current thread: