From 8380e83395c97219127515d4dc87d59cb3bbd147 Mon Sep 17 00:00:00 2001 From: Ermal Date: Thu, 21 Jul 2011 21:09:56 +0000 Subject: Fix redirurl collection so after login the user can be redirected correctly --- usr/local/captiveportal/index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr') diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php index b08a358..1bd9366 100755 --- a/usr/local/captiveportal/index.php +++ b/usr/local/captiveportal/index.php @@ -77,12 +77,12 @@ if ($orig_host != $ourhostname) { exit; } -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']; +else if (preg_match("/redirurl=(.*)/", $orig_request, $matches)) + $redirurl = urldecode($matches[1]); +else if ($_REQUEST['redirurl']) + $redirurl = $_REQUEST['redirurl']; $macfilter = !isset($config['captiveportal']['nomacfilter']); $passthrumac = isset($config['captiveportal']['passthrumacadd']); -- cgit v1.1