Create shell_esc.lua
This commit is contained in:
parent
1e49e686c9
commit
0dbbdd000e
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
--escape shell arguments to prevent command injection
|
||||
local function shell_esc(x)
|
||||
return (x:gsub('\\', '\\\\')
|
||||
:gsub('\'', '\\\''))
|
||||
end
|
||||
Loading…
Reference in New Issue