diff options
author | Ermal <eri@pfsense.org> | 2010-09-15 13:04:44 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-09-15 13:04:44 +0000 |
commit | c9cb32c4a302ebbfd1bfcc18050389cae47413cf (patch) | |
tree | dcffe8a1388986ab5ca9637bd35601449e7f3ac0 /usr/local | |
parent | 5556f3a1169545ddbd24a588a6242deb354650cb (diff) | |
download | pfsense-c9cb32c4a302ebbfd1bfcc18050389cae47413cf.zip pfsense-c9cb32c4a302ebbfd1bfcc18050389cae47413cf.tar.gz |
Do not overwrite the redirurl parameter already taken care of.
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/captiveportal/index.php | 11 |
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']; |