From c9cb32c4a302ebbfd1bfcc18050389cae47413cf Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 15 Sep 2010 13:04:44 +0000 Subject: Do not overwrite the redirurl parameter already taken care of. --- usr/local/captiveportal/index.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'usr/local/captiveportal/index.php') 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']; -- cgit v1.1