Commit f39ce32b authored by Franco Fichtner's avatar Franco Fichtner

services: url_safe() for #1168

parent c5ab052b
......@@ -109,7 +109,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
write_config();
services_dnsmasq_configure();
header("Location: services_dnsmasq.php");
header(url_safe('Location: /services_dnsmasq.php'));
exit;
}
} elseif (isset($pconfig['apply'])) {
......@@ -121,7 +121,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
services_dhcpleases_configure();
services_dnsmasq_configure();
clear_subsystem_dirty('hosts');
header("Location: services_dnsmasq.php");
header(url_safe('Location: /services_dnsmasq.php'));
exit;
} elseif (!empty($pconfig['act']) && $pconfig['act'] == 'del') {
$a_hosts = &$config['dnsmasq']['hosts'];
......
......@@ -117,7 +117,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
services_dnsmasq_configure();
write_config();
header("Location: services_dnsmasq.php");
header(url_safe('Location: /services_dnsmasq.php'));
exit;
}
}
......
......@@ -134,7 +134,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
usort($config['dnsmasq']['hosts'], "hostcmp");
mark_subsystem_dirty('hosts');
write_config();
header("Location: services_dnsmasq.php");
header(url_safe('Location: /services_dnsmasq.php'));
exit;
}
}
......
......@@ -162,7 +162,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
write_config();
services_dyndns_configure_client($dyndns);
header("Location: services_dyndns.php");
header(url_safe('Location: /services_dyndns.php'));
exit;
}
}
......
......@@ -51,7 +51,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
/* reload all components that use igmpproxy */
services_igmpproxy_configure();
clear_subsystem_dirty('igmpproxy');
header("Location: services_igmpproxy.php");
header(url_safe('Location: /services_igmpproxy.php'));
exit;
}
}
......
......@@ -95,7 +95,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
write_config();
mark_subsystem_dirty('igmpproxy');
header("Location: services_igmpproxy.php");
header(url_safe('Location: /services_igmpproxy.php'));
exit;
}
}
......
......@@ -114,7 +114,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
write_config("Updated NTP Server Settings");
system_ntp_configure();
header("Location: services_ntpd.php");
header(url_safe('Location: /services_ntpd.php'));
exit;
}
}
......
......@@ -68,7 +68,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$config['ntpd']['gps'] = $gps;
write_config("Updated NTP GPS Settings");
system_ntp_configure();
header("Location: services_ntpd_gps.php");
header(url_safe('Location: /services_ntpd_gps.php'));
exit;
}
}
......
......@@ -67,7 +67,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$config['ntpd']['pps'] = $pps;
write_config("Updated NTP PPS Settings");
system_ntp_configure();
header("Location: services_ntpd_pps.php");
header(url_safe('Location: /services_ntpd_pps.php'));
exit;
}
}
......
......@@ -109,7 +109,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
} else {
services_dnsupdate_process();
}
header("Location: services_rfc2136.php");
header(url_safe('Location: /services_rfc2136.php'));
exit;
}
}
......
......@@ -117,7 +117,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
write_config();
services_snmpd_configure();
get_std_save_message();
header("Location: services_snmp.php");
header(url_safe('Location: /services_snmp.php'));
exit;
}
}
......
......@@ -62,7 +62,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
clear_subsystem_dirty('unbound');
/* Update resolv.conf in case the interface bindings exclude localhost. */
system_resolvconf_generate();
header("Location: services_unbound.php");
header(url_safe('Location: /services_unbound.php'));
exit;
} else {
// perform validations
......@@ -102,7 +102,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
write_config("DNS Resolver configured.");
mark_subsystem_dirty('unbound');
header("Location: services_unbound.php");
header(url_safe('Location: /services_unbound.php'));
exit;
}
}
......
......@@ -68,7 +68,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if (!empty($pconfig['apply'])) {
services_unbound_configure();
clear_subsystem_dirty('unbound');
header("Location: services_unbound_acls.php");
header(url_safe('Location: /services_unbound_acls.php'));
exit;
} elseif (!empty($act) && $act == "del") {
if (isset($id) && !empty($a_acls[$id])) {
......@@ -112,7 +112,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
mark_subsystem_dirty("unbound");
write_config();
header("Location: services_unbound_acls.php");
header(url_safe('Location: /services_unbound_acls.php'));
exit;
}
}
......
......@@ -71,7 +71,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if (!empty($_POST['apply'])) {
services_unbound_configure();
clear_subsystem_dirty('unbound');
header("Location: services_unbound_advanced.php");
header(url_safe('Location: /services_unbound_advanced.php'));
exit;
} else {
$pconfig = $_POST;
......@@ -87,7 +87,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
write_config("DNS Resolver configured.");
mark_subsystem_dirty('unbound');
header("Location: services_unbound_advanced.php");
header(url_safe('Location: /services_unbound_advanced.php'));
exit;
}
}
......
......@@ -93,7 +93,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
mark_subsystem_dirty('unbound');
write_config();
header("Location: services_unbound_overrides.php");
header(url_safe('Location: /services_unbound_overrides.php'));
exit;
}
}
......
......@@ -125,10 +125,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
usort($a_hosts, "hostcmp");
mark_subsystem_dirty('unbound');
write_config();
header("Location: services_unbound_overrides.php");
header(url_safe('Location: /services_unbound_overrides.php'));
exit;
}
}
$service_hook = 'unbound';
......
......@@ -60,7 +60,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
clear_subsystem_dirty('unbound');
/* Update resolv.conf in case the interface bindings exclude localhost. */
system_resolvconf_generate();
header("Location: services_unbound_overrides.php");
header(url_safe('Location: /services_unbound_overrides.php'));
exit;
} elseif (!empty($pconfig['act']) && $pconfig['act'] == 'del') {
if (isset($pconfig['id']) && !empty($a_hosts[$pconfig['id']])) {
......
......@@ -150,7 +150,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
write_config('Modified Universal Plug and Play settings');
sync_package_miniupnpd();
header("Location: services_upnp.php");
header(url_safe('Location: /services_upnp.php'));
exit;
}
}
......
......@@ -88,7 +88,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
usort($config['wol']['wolentry'], "wolcmp");
write_config();
header("Location: services_wol.php");
header(url_safe('Location: /services_wol.php'));
exit;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment