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