Update hangup_rx.lua

Prevent an error if the value of x is nil.
This commit is contained in:
FusionPBX
2024-10-17 02:29:23 -06:00
committed by GitHub
parent 5459bca44b
commit 581c6177cf

View File

@@ -63,6 +63,7 @@
--escape shell arguments to prevent command injection
local function shell_esc(x)
if (x == nil) then return '' end
return (x:gsub('\\', '\\\\')
:gsub('\'', '\\\''))
end