From 3bc77cd3700528a3f432441556ccedff205aa68f Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 21 May 2010 23:09:31 -0400 Subject: Do not allow nonstop redirects to self --- usr/local/captiveportal/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local/captiveportal') diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php index 4908371..904f268 100755 --- a/usr/local/captiveportal/index.php +++ b/usr/local/captiveportal/index.php @@ -458,7 +458,7 @@ document.location.href="{$my_redirurl}"; EOD; } else { - if($_POST['ORIGINAL_PORTAL_IP']) { + if($_POST['ORIGINAL_PORTAL_IP'] && $_SERVER['SERVER_NAME'] != $_POST['ORIGINAL_PORTAL_IP']) { header ('HTTP/1.1 301 Moved Permanently'); header("Location: " . $_POST['ORIGINAL_PORTAL_IP']); } else { -- cgit v1.1