summaryrefslogtreecommitdiffstats
path: root/usr/local/captiveportal/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/captiveportal/index.php')
-rwxr-xr-xusr/local/captiveportal/index.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php
index 79a9fa6..70188f6 100755
--- a/usr/local/captiveportal/index.php
+++ b/usr/local/captiveportal/index.php
@@ -49,10 +49,11 @@ $orig_request = $_REQUEST['redirurl'];
$clientip = $_SERVER['REMOTE_ADDR'];
if (!$clientip) {
- /* not good - bail out */
- echo "An error occurred. Please check the system logs for more information.";
- log_error("Captive portal could not determine client's IP address.");
- exit;
+ /* not good - bail out */
+ 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;
}
if (isset($config['captiveportal']['httpslogin']))
@@ -78,8 +79,6 @@ if ($orig_host != $ourhostname) {
}
if (preg_match("/redirurl=(.*)/", $orig_request, $matches))
$redirurl = urldecode($matches[1]);
-if ($_POST['redirurl'])
- $redirurl = $_POST['redirurl'];
if (!empty($config['captiveportal']['redirurl']))
$redirurl = $config['captiveportal']['redirurl'];
OpenPOWER on IntegriCloud