diff options
author | Ermal <eri@pfsense.org> | 2013-01-23 16:24:17 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-01-23 16:24:17 +0000 |
commit | 287f7e26199a323f0f4cd08f9e0a94073b7d5112 (patch) | |
tree | b7673e61252a842ab7a589dea9b0ae53ac85e538 /usr/local/www/services_captiveportal_hostname.php | |
parent | fa7b825f901c24d6de91ce980a651eddb5f15abb (diff) | |
download | pfsense-287f7e26199a323f0f4cd08f9e0a94073b7d5112.zip pfsense-287f7e26199a323f0f4cd08f9e0a94073b7d5112.tar.gz |
Convert all captiveportal code to not use ipfw_set_context since its not needed anymore. Also add code to validate cpzone on webgui pages before being used
Diffstat (limited to 'usr/local/www/services_captiveportal_hostname.php')
-rwxr-xr-x | usr/local/www/services_captiveportal_hostname.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr/local/www/services_captiveportal_hostname.php b/usr/local/www/services_captiveportal_hostname.php index 679e562..6a09522 100755 --- a/usr/local/www/services_captiveportal_hostname.php +++ b/usr/local/www/services_captiveportal_hostname.php @@ -51,9 +51,9 @@ $cpzone = $_GET['zone']; if (isset($_POST['zone'])) $cpzone = $_POST['zone']; -if (empty($cpzone)) { - header("Location: services_captiveportal_zones.php"); - exit; +if (empty($cpzone) || empty($config['captiveportal'][$cpzone])) { + header("Location: services_captiveportal_zones.php"); + exit; } if (!is_array($config['captiveportal'])) @@ -73,8 +73,6 @@ if ($_GET['act'] == "del" && !empty($cpzone)) { $ipent['ip'] .= "/{$ipent['sn']}"; $ip = gethostbyname($ipent['ip']); if(is_ipaddr($ip)) { - captiveportal_ipfw_set_context($zone); - $ipfw = pfSense_ipfw_getTablestats($cpzone, 3, $ip); if (is_array($ipfw)) { captiveportal_free_dn_ruleno($ipfw['dnpipe']); pfSense_pipe_action("pipe delete {$ipfw['dnpipe']}"); |