diff --git a/emhttp/plugins/dynamix/OutgoingProxy.page b/emhttp/plugins/dynamix/OutgoingProxy.page index da0ad530b..bd3d709dc 100644 --- a/emhttp/plugins/dynamix/OutgoingProxy.page +++ b/emhttp/plugins/dynamix/OutgoingProxy.page @@ -15,15 +15,15 @@ Tag="icon-network" * all copies or substantial portions of the Software. */ -$opmPlugin = "dynamix"; -require_once("plugins/".$opmPlugin."/include/OutgoingProxyLib.php"); +require_once("plugins/dynamix/include/OutgoingProxyLib.php"); /* Parse the plugin config file. */ $cfg = parse_plugin_config(); /* Pid file used to track the Running/Stopped status. */ -$opm_pid = "OutgoingProxy"; -$pid_file = "/var/run/".$opm_pid.".pid"; +$opm_pid = "OutgoingProxy"; +$pid_file = OPM_PID_FILE; + $cfg['proxy_active'] = $cfg['proxy_active'] ?? "0"; if ($cfg['proxy_active'] != "0") { file_put_contents($pid_file, "running"); @@ -32,9 +32,9 @@ if ($cfg['proxy_active'] != "0") { } /* Be sure proxy_mames are defined */ -$cfg['proxy_name_1'] = $cfg['proxy_name_1'] ?? ""; -$cfg['proxy_name_2'] = $cfg['proxy_name_2'] ?? ""; -$cfg['proxy_name_3'] = $cfg['proxy_name_3'] ?? ""; +$cfg['proxy_name_1'] = htmlspecialchars($cfg['proxy_name_1']) ?? ""; +$cfg['proxy_name_2'] = htmlspecialchars($cfg['proxy_name_2']) ?? ""; +$cfg['proxy_name_3'] = htmlspecialchars($cfg['proxy_name_3']) ?? ""; /* Parse the url, user, and password from the full url for proxy 1. */ $url_array = get_proxy_info($cfg['proxy_url_1'] ?? "", $cfg['proxy_user_1'] ?? "", $cfg['proxy_pass_1'] ?? ""); @@ -59,23 +59,20 @@ $proxy_3_url = $url_array['full_url']; ?>