summaryrefslogtreecommitdiffstats
path: root/usr/local/www/wizard.php
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-11-17 07:43:57 -0700
committerErik Fonnesbeck <efonnes@gmail.com>2010-11-17 08:35:30 -0700
commita219c6432582650f4942cfb3b5c9c94e14551af5 (patch)
tree61224db4c7a4c605efa087d6551573f2e5aae685 /usr/local/www/wizard.php
parentfd7f136b2665a1fda1df5329d24617413cf78847 (diff)
downloadpfsense-a219c6432582650f4942cfb3b5c9c94e14551af5.zip
pfsense-a219c6432582650f4942cfb3b5c9c94e14551af5.tar.gz
Add workaround for referrer check to not be triggered on the previous IP address when redirected by the setup wizard.
Diffstat (limited to 'usr/local/www/wizard.php')
-rwxr-xr-xusr/local/www/wizard.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php
index 0c93977..cc9ce72 100755
--- a/usr/local/www/wizard.php
+++ b/usr/local/www/wizard.php
@@ -894,7 +894,7 @@ if($pkg['step'][$stepid]['javascriptafterformdisplay'] <> "") {
*/
function fixup_string($string) {
- global $config, $myurl, $title;
+ global $config, $g, $myurl, $title;
$newstring = $string;
// fixup #1: $myurl -> http[s]://ip_address:port/
switch($config['system']['webgui']['protocol']) {
@@ -926,6 +926,8 @@ function fixup_string($string) {
else if ($urlhost == get_interface_ip() && is_ipaddr($config['interfaces']['wan']['ipaddr']))
$urlhost = $config['interfaces']['wan']['ipaddr'];
}
+ if($urlhost != $_SERVER['HTTP_HOST'])
+ file_put_contents("{$g['tmp_path']}/setupwizard_lastreferrer", $proto . "://" . $_SERVER['HTTP_HOST'] . $urlport . $_SERVER['REQUEST_URI']);
$myurl = $proto . "://" . $urlhost . $urlport . "/";
if (strstr($newstring, "\$myurl"))
OpenPOWER on IntegriCloud