summaryrefslogtreecommitdiffstats
path: root/usr/local/captiveportal
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-01-04 10:26:04 +0000
committerErmal <eri@pfsense.org>2013-01-04 10:26:04 +0000
commitf89afb4765f317a532cb71f3b3883e8f897cfebb (patch)
tree6e0b55ceeeba88f8fc1f106240fce0d8080d8c4b /usr/local/captiveportal
parent70e454e168348dab4a99509c16c059b1d769291f (diff)
downloadpfsense-f89afb4765f317a532cb71f3b3883e8f897cfebb.zip
pfsense-f89afb4765f317a532cb71f3b3883e8f897cfebb.tar.gz
Get back to trim() and strip / from left/right but when redirecting properly create the redirurl var
Diffstat (limited to 'usr/local/captiveportal')
-rwxr-xr-xusr/local/captiveportal/index.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php
index 72f4749..3b685e9 100755
--- a/usr/local/captiveportal/index.php
+++ b/usr/local/captiveportal/index.php
@@ -49,7 +49,7 @@ $cpcfg = $config['captiveportal'][$cpzone];
$orig_host = $_ENV['HTTP_HOST'];
/* NOTE: IE 8/9 is buggy and that is why this is needed */
-$orig_request = rtrim($_REQUEST['redirurl'], " /");
+$orig_request = trim($_REQUEST['redirurl'], " /");
$orig_request = empty($orig_request) ? '' : $orig_request;
$clientip = $_SERVER['REMOTE_ADDR'];
@@ -84,9 +84,9 @@ if ($orig_host != $ourhostname) {
it's connected to us. Issue a redirect... */
if (isset($cpcfg['httpslogin']))
- header("Location: https://{$ourhostname}/index.php?zone={$cpzone}&redirurl=" . urlencode("http://{$orig_host}{$orig_request}"));
+ header("Location: https://{$ourhostname}/index.php?zone={$cpzone}&redirurl=" . urlencode("http://{$orig_host}/{$orig_request}"));
else
- header("Location: http://{$ourhostname}/index.php?zone={$cpzone}&redirurl=" . urlencode("http://{$orig_host}{$orig_request}"));
+ header("Location: http://{$ourhostname}/index.php?zone={$cpzone}&redirurl=" . urlencode("http://{$orig_host}/{$orig_request}"));
ob_flush();
return;
OpenPOWER on IntegriCloud