Do not overwrite the redirurl parameter already taken care of.

This commit is contained in:
Ermal 2010-09-15 13:04:44 +00:00
parent 5556f3a116
commit c9cb32c4a3

View File

@ -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'];