summaryrefslogtreecommitdiffstats
path: root/usr/local/www/wizard.php
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-11-18 00:23:41 -0700
committerErik Fonnesbeck <efonnes@gmail.com>2010-11-18 00:23:41 -0700
commitb8d4d7cdc5e89ca5ef41ee69fcc4d74f494db573 (patch)
tree9cec26b916dbc4069d6183f707c9be26d0cbc446 /usr/local/www/wizard.php
parent6898927f4f48bd67710cffe0cdd828922254e25b (diff)
downloadpfsense-b8d4d7cdc5e89ca5ef41ee69fcc4d74f494db573.zip
pfsense-b8d4d7cdc5e89ca5ef41ee69fcc4d74f494db573.tar.gz
Handling this properly when the web gui is on an alternate port number.
Diffstat (limited to 'usr/local/www/wizard.php')
-rwxr-xr-xusr/local/www/wizard.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php
index 485dd17..d52c738 100755
--- a/usr/local/www/wizard.php
+++ b/usr/local/www/wizard.php
@@ -918,7 +918,9 @@ function fixup_string($string) {
$urlport = "";
}
}
- $urlhost = $_SERVER['HTTP_HOST'];
+ $http_host = explode(":", $_SERVER['HTTP_HOST']);
+ $http_host = $http_host[0];
+ $urlhost = $http_host;
// If finishing the setup wizard, check if accessing on a LAN or WAN address that changed
if($title == "Reload in progress") {
if (is_ipaddr($urlhost)) {
@@ -930,8 +932,8 @@ function fixup_string($string) {
}
}
}
- if($urlhost != $_SERVER['HTTP_HOST'])
- file_put_contents("{$g['tmp_path']}/setupwizard_lastreferrer", $proto . "://" . $_SERVER['HTTP_HOST'] . $urlport . $_SERVER['REQUEST_URI']);
+ if($urlhost != $http_host)
+ file_put_contents("{$g['tmp_path']}/setupwizard_lastreferrer", $proto . "://" . $http_host . $urlport . $_SERVER['REQUEST_URI']);
$myurl = $proto . "://" . $urlhost . $urlport . "/";
if (strstr($newstring, "\$myurl"))
OpenPOWER on IntegriCloud