Security Fixes (#4268)
* Updated fixes for CVE-2019-11409 * Fix for XSS - (CVE-2018-19094) * Fix for fax cmd injection (CVE-2018-19096)
This commit is contained in:
parent
13270cca6d
commit
ece98a9c01
|
|
@ -202,8 +202,8 @@
|
|||
echo "<td valign='top' class='".$row_style[$c]."'>".$domain_name." </td>\n";
|
||||
}
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$tmp_number." </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$cid_name." </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$cid_num." </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".escape($cid_name)." </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".escape($cid_num)." </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$dest." </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".((strlen($application) > 0) ? $application.":".$application_data : null)." </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$read_codec.":".$read_rate." / ".$write_codec.":".$write_rate." </td>\n";
|
||||
|
|
|
|||
|
|
@ -57,6 +57,13 @@
|
|||
return s
|
||||
end
|
||||
|
||||
-- escape shell arguments to prevent command injection
|
||||
|
||||
local function shell_esc(x)
|
||||
return ("'"..x:gsub('\\', '\\\\')
|
||||
:gsub('\'', '\\\'').."'")
|
||||
end
|
||||
|
||||
-- set channel variables to lua variables
|
||||
domain_uuid = env:getHeader("domain_uuid");
|
||||
domain_name = env:getHeader("domain_name");
|
||||
|
|
@ -219,6 +226,8 @@
|
|||
else
|
||||
cmd = cmd .. "fax_prefix=false ";
|
||||
end
|
||||
|
||||
cmd=shell_esc(cmd);
|
||||
freeswitch.consoleLog("notice", "[fax] command: " .. cmd .. "\n");
|
||||
result = api:execute("system", cmd);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue