Add. Use params in vm/check_password.lua (#2141)
This commit is contained in:
committed by
FusionPBX
parent
ad542a5db5
commit
79dd1faaea
@@ -44,14 +44,15 @@
|
|||||||
--get the voicemail settings from the database
|
--get the voicemail settings from the database
|
||||||
if (voicemail_id) then
|
if (voicemail_id) then
|
||||||
if (session:ready()) then
|
if (session:ready()) then
|
||||||
sql = [[SELECT * FROM v_voicemails
|
local sql = [[SELECT * FROM v_voicemails
|
||||||
WHERE domain_uuid = ']] .. domain_uuid ..[['
|
WHERE domain_uuid = :domain_uuid
|
||||||
AND voicemail_id = ']] .. voicemail_id ..[['
|
AND voicemail_id = :voicemail_id
|
||||||
AND voicemail_enabled = 'true' ]];
|
AND voicemail_enabled = 'true' ]];
|
||||||
|
local params = {domain_uuid = domain_uuid, voicemail_id = voicemail_id};
|
||||||
if (debug["sql"]) then
|
if (debug["sql"]) then
|
||||||
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "\n");
|
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
|
||||||
end
|
end
|
||||||
status = dbh:query(sql, function(row)
|
dbh:query(sql, params, function(row)
|
||||||
voicemail_uuid = string.lower(row["voicemail_uuid"]);
|
voicemail_uuid = string.lower(row["voicemail_uuid"]);
|
||||||
voicemail_password = row["voicemail_password"];
|
voicemail_password = row["voicemail_password"];
|
||||||
greeting_id = row["greeting_id"];
|
greeting_id = row["greeting_id"];
|
||||||
|
|||||||
Reference in New Issue
Block a user