Skip to content

Commit

Permalink
FIX-- Apostrophe cause message failures due to CURL (#163)
Browse files Browse the repository at this point in the history
* FIX-- Apostrophe cause message failures due to CURL
  • Loading branch information
mrjd19811 authored Sep 10, 2022
1 parent 241509b commit 37e4cfa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sms/resources/install/scripts/app/sms/index.lua
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@
if (msgtype ~= nil and string.find(msgtype, "imdn") ~= nil) then mdn = true end;
if (not mdn) then
-- No XML content, continue processing
body = body:gsub("'","'\\''"); -- Fixing Apostrophe for CURL
if (carrier == "flowroute") then
cmd = "curl -u ".. access_key ..":" .. secret_key .. " -H \"Content-Type: application/json\" -X POST -d '{\"to\":\"" .. to .. "\",\"from\":\"" .. outbound_caller_id_number .."\",\"body\":\"" .. body .. "\"}' " .. api_url;
elseif (carrier == "peerless") then
Expand Down

0 comments on commit 37e4cfa

Please sign in to comment.