Update hangup_rx.lua

Prevent error if the value of x is nil.
This commit is contained in:
FusionPBX
2024-10-17 02:30:02 -06:00
committed by GitHub
parent 0a08b522f6
commit b9dd9af354

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