Commit 05b1fa9a authored by Franco Fichtner's avatar Franco Fichtner

vpn: url_safe() in IPsec pages

parent d3bca141
...@@ -92,7 +92,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ...@@ -92,7 +92,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
ipsec_configure(); ipsec_configure();
filter_configure(); filter_configure();
clear_subsystem_dirty('ipsec'); clear_subsystem_dirty('ipsec');
header("Location: vpn_ipsec.php"); header(url_safe('Location: vpn_ipsec.php'));
exit; exit;
} elseif (!empty($_POST['act']) && $_POST['act'] == "delphase1" ) { } elseif (!empty($_POST['act']) && $_POST['act'] == "delphase1" ) {
$del_items = array(); $del_items = array();
...@@ -119,7 +119,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ...@@ -119,7 +119,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
write_config(); write_config();
mark_subsystem_dirty('ipsec'); mark_subsystem_dirty('ipsec');
header("Location: vpn_ipsec.php"); header(url_safe('Location: vpn_ipsec.php'));
exit; exit;
} elseif (!empty($_POST['act']) && $_POST['act'] == "delphase2" ) { } elseif (!empty($_POST['act']) && $_POST['act'] == "delphase2" ) {
if (isset($_POST['id']) && isset($config['ipsec']['phase2'][$_POST['id']])){ if (isset($_POST['id']) && isset($config['ipsec']['phase2'][$_POST['id']])){
...@@ -131,7 +131,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ...@@ -131,7 +131,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
} }
write_config(); write_config();
mark_subsystem_dirty('ipsec'); mark_subsystem_dirty('ipsec');
header("Location: vpn_ipsec.php"); header(url_safe('Location: vpn_ipsec.php'));
exit; exit;
} elseif (!empty($_POST['act']) && $_POST['act'] == "movep1" ) { } elseif (!empty($_POST['act']) && $_POST['act'] == "movep1" ) {
// move phase 1 records // move phase 1 records
...@@ -146,7 +146,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ...@@ -146,7 +146,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
} }
write_config(); write_config();
mark_subsystem_dirty('ipsec'); mark_subsystem_dirty('ipsec');
header("Location: vpn_ipsec.php"); header(url_safe('Location: vpn_ipsec.php'));
exit; exit;
} elseif (!empty($_POST['act']) && $_POST['act'] == "movep2" ) { } elseif (!empty($_POST['act']) && $_POST['act'] == "movep2" ) {
// move phase 2 records // move phase 2 records
...@@ -161,7 +161,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ...@@ -161,7 +161,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
} }
write_config(); write_config();
mark_subsystem_dirty('ipsec'); mark_subsystem_dirty('ipsec');
header("Location: vpn_ipsec.php"); header(url_safe('Location: vpn_ipsec.php'));
exit; exit;
} elseif (!empty($_POST['act']) && $_POST['act'] == "togglep1" && isset($a_phase1[$_POST['id']]) ) { } elseif (!empty($_POST['act']) && $_POST['act'] == "togglep1" && isset($a_phase1[$_POST['id']]) ) {
// toggle phase 1 record // toggle phase 1 record
...@@ -172,7 +172,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ...@@ -172,7 +172,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
} }
write_config(); write_config();
mark_subsystem_dirty('ipsec'); mark_subsystem_dirty('ipsec');
header("Location: vpn_ipsec.php"); header(url_safe('Location: vpn_ipsec.php'));
exit; exit;
} elseif (!empty($_POST['act']) && $_POST['act'] == "togglep2" && isset($a_phase2[$_POST['id']]) ) { } elseif (!empty($_POST['act']) && $_POST['act'] == "togglep2" && isset($a_phase2[$_POST['id']]) ) {
// toggle phase 2 record // toggle phase 2 record
...@@ -183,7 +183,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ...@@ -183,7 +183,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
} }
write_config(); write_config();
mark_subsystem_dirty('ipsec'); mark_subsystem_dirty('ipsec');
header("Location: vpn_ipsec.php"); header(url_safe('Location: vpn_ipsec.php'));
exit; exit;
} }
} }
......
...@@ -51,7 +51,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ...@@ -51,7 +51,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
unset($config['ipsec']['mobilekey'][$_POST['id']]); unset($config['ipsec']['mobilekey'][$_POST['id']]);
write_config('Deleted pre-shared IPsec key'); write_config('Deleted pre-shared IPsec key');
mark_subsystem_dirty('ipsec'); mark_subsystem_dirty('ipsec');
header("Location: vpn_ipsec_keys.php"); header(url_safe('Location: vpn_ipsec_keys.php'));
exit; exit;
} }
} elseif (isset($_POST['apply'])) { } elseif (isset($_POST['apply'])) {
...@@ -62,7 +62,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ...@@ -62,7 +62,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
clear_subsystem_dirty('ipsec'); clear_subsystem_dirty('ipsec');
} else { } else {
// nothing to post, redirect // nothing to post, redirect
header("Location: vpn_ipsec_keys.php"); header(url_safe('Location: vpn_ipsec_keys.php'));
exit; exit;
} }
} }
......
...@@ -111,7 +111,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -111,7 +111,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
write_config("{$config_write_text} IPsec Pre-Shared Keys"); write_config("{$config_write_text} IPsec Pre-Shared Keys");
mark_subsystem_dirty('ipsec'); mark_subsystem_dirty('ipsec');
header("Location: vpn_ipsec_keys.php"); header(url_safe('Location: vpn_ipsec_keys.php'));
exit; exit;
} }
} }
......
...@@ -397,7 +397,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -397,7 +397,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
write_config(); write_config();
mark_subsystem_dirty('ipsec'); mark_subsystem_dirty('ipsec');
header("Location: vpn_ipsec.php"); header(url_safe('Location: vpn_ipsec.php'));
exit; exit;
} }
} }
......
...@@ -445,7 +445,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -445,7 +445,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
write_config(); write_config();
mark_subsystem_dirty('ipsec'); mark_subsystem_dirty('ipsec');
header("Location: vpn_ipsec.php"); header(url_safe('Location: vpn_ipsec.php'));
exit; 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