Update hangup_rx.lua
Prevent error if the value of x is nil.
This commit is contained in:
@@ -63,6 +63,7 @@
|
|||||||
|
|
||||||
--escape shell arguments to prevent command injection
|
--escape shell arguments to prevent command injection
|
||||||
local function shell_esc(x)
|
local function shell_esc(x)
|
||||||
|
if (x == nil) then return '' end
|
||||||
return (x:gsub('\\', '\\\\')
|
return (x:gsub('\\', '\\\\')
|
||||||
:gsub('\'', '\\\''))
|
:gsub('\'', '\\\''))
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user