From 9628bd1c30fd67a9532a3bd031a0461a13f0b01d Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 24 May 2010 22:11:57 +0000 Subject: Actually use the radius WISPr(4) attribute 'url_redirection' if present. --- usr/local/captiveportal/index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr/local/captiveportal/index.php') diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php index 904f268..7a87312 100755 --- a/usr/local/captiveportal/index.php +++ b/usr/local/captiveportal/index.php @@ -244,7 +244,7 @@ function portal_mac_radius($clientmac,$clientip) { function portal_allow($clientip,$clientmac,$username,$password = null, $attributes = null, $ruleno = null) { - global $redirurl, $g, $config, $url_redirection, $type, $passthrumac; + global $redirurl, $g, $config, $type, $passthrumac; /* See if a ruleno is passed, if not start locking the sessions because this means there isn't one atm */ $captiveshouldunlock = false; @@ -405,8 +405,8 @@ function portal_allow($clientip,$clientmac,$username,$password = null, $attribut write_config(); /* redirect user to desired destination */ - if ($url_redirection) - $my_redirurl = $url_redirection; + if (!empty($attributes['url_redirection'])) + $my_redirurl = $attributes['url_redirection']; else if ($config['captiveportal']['redirurl']) $my_redirurl = $config['captiveportal']['redirurl']; else @@ -501,4 +501,4 @@ function disconnect_client($sessionid, $logoutReason = "LOGOUT", $term_cause = 1 unlock($cplock); } -?> \ No newline at end of file +?> -- cgit v1.1