From 0eb9b1b4a7f5c8455d5197fff121ddddfff4ad46 Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 24 May 2010 22:54:16 +0000 Subject: Actually use the radius WISPr(4) attribute 'url_redirection' when present. --- usr/local/captiveportal/index.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'usr/local/captiveportal') diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php index 7a87312..5735a21 100755 --- a/usr/local/captiveportal/index.php +++ b/usr/local/captiveportal/index.php @@ -161,7 +161,10 @@ exit; } else if ($auth_list['auth_val'] == 3) { captiveportal_logportalauth($_POST['auth_user'],$clientmac,$clientip,"FAILURE",$auth_list['reply_message']); - portal_reply_page($redirurl, "error", $auth_list['reply_message']); + if (!empty($auth_list['url_redirection'])) + header("Location: {$auth_list['url_redirection']}"); + else + portal_reply_page($redirurl, "error", $auth_list['reply_message']); } } else { captiveportal_logportalauth($_POST['auth_user'],$clientmac,$clientip,"ERROR"); @@ -239,6 +242,9 @@ function portal_mac_radius($clientmac,$clientip) { if ($auth_list['auth_val'] == 2) { return TRUE; } + if (!empty($auth_list['url_redirection'])) + header("Location: {$auth_list['url_redirection']}"); + return FALSE; } -- cgit v1.1