summaryrefslogtreecommitdiffstats
path: root/usr/local/captiveportal
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-12-13 21:42:01 +0000
committerErmal <eri@pfsense.org>2012-12-13 21:42:01 +0000
commit4a5feb839e9e8ab4b398a95cb278e2d9a9f27193 (patch)
tree1d868b20e1138b3cecc019384527665765713333 /usr/local/captiveportal
parent6cbda3175f263f32538b2df9d1324d45d06caf60 (diff)
downloadpfsense-4a5feb839e9e8ab4b398a95cb278e2d9a9f27193.zip
pfsense-4a5feb839e9e8ab4b398a95cb278e2d9a9f27193.tar.gz
Do not exit from php rather return to not have to refork again from the manager
Diffstat (limited to 'usr/local/captiveportal')
-rwxr-xr-xusr/local/captiveportal/index.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php
index bb95971..384f1dd 100755
--- a/usr/local/captiveportal/index.php
+++ b/usr/local/captiveportal/index.php
@@ -57,7 +57,8 @@ if (!$clientip) {
log_error("Captive portal could not determine client's IP address.");
$error_message = "An error occurred. Please check the system logs for more information.";
portal_reply_page($redirurl, "error", $errormsg);
- exit;
+ ob_flush();
+ return;
}
$listenporthttps = $cpcfg['listenporthttps'] ? $cpcfg['listenporthttps'] : ($cpcfg['zoneid'] + 1);
@@ -82,7 +83,8 @@ if ($orig_host != $ourhostname) {
else
header("Location: http://{$ourhostname}/index.php?zone={$cpzone}&redirurl=" . urlencode("http://{$orig_host}{$orig_request}"));
- exit;
+ ob_flush();
+ return;
}
if (!empty($config['captiveportal'][$cpzone]['redirurl']))
$redirurl = $config['captiveportal'][$cpzone]['redirurl'];
@@ -102,7 +104,8 @@ if ($macfilter || $passthrumac) {
captiveportal_logportalauth("unauthenticated","noclientmac",$clientip,"ERROR");
echo "An error occurred. Please check the system logs for more information.";
log_error("Captive portal could not determine client's MAC address. Disable MAC address filtering in captive portal if you do not need this functionality.");
- exit;
+ ob_flush();
+ return;
}
}
@@ -136,10 +139,8 @@ setTimeout('window.close();',5000) ;
EOD;
captiveportal_disconnect_client($_POST['logout_id']);
- exit;
} else if ($clientmac && $radmac_enable && portal_mac_radius($clientmac,$clientip, $radiusctx)) {
/* radius functions handle everything so we exit here since we're done */
- exit;
} else if (portal_consume_passthrough_credit($clientmac)) {
/* allow the client through if it had a pass-through credit for its MAC */
@@ -231,7 +232,6 @@ EOD;
portal_reply_page($redirurl, "login",null,$clientmac,$clientip);
}
-exit;
-
+ob_flush();
?>
OpenPOWER on IntegriCloud