From ac10faad42081ccfe48a37aa9814bc4684ffb701 Mon Sep 17 00:00:00 2001 From: Warren Baker Date: Fri, 25 May 2012 12:11:43 +0200 Subject: [PATCH] Ensure there is a '.' between hostname and domain. Partially fixes #2454 --- usr/local/captiveportal/index.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php index 1fecf26062..1a0affc173 100755 --- a/usr/local/captiveportal/index.php +++ b/usr/local/captiveportal/index.php @@ -63,13 +63,13 @@ $listenporthttps = $cpcfg['listenporthttps'] ? $cpcfg['listenporthttps'] : ($cpc $listenporthttp = $cpcfg['listenporthttp'] ? $cpcfg['listenporthttp'] : $cpcfg['zoneid']; if (isset($config['captiveportal'][$cpzone]['httpslogin'])) - $ourhostname = $config['captiveportal'][$cpzone]['httpsname'] . ":" . $listenporthttps; + $ourhostname = $config['captiveportal'][$cpzone]['httpsname'] . ":" . $listenporthttps; else { - $ifip = portal_ip_from_client_ip($clientip); - if (!$ifip) - $ourhostname = $config['system']['hostname'] . $config['system']['domain'] . ":{$listenporthttp}"; - else - $ourhostname = "{$ifip}:{$listenporthttp}"; + $ifip = portal_ip_from_client_ip($clientip); + if (!$ifip) + $ourhostname = "{$config['system']['hostname']}.{$config['system']['domain']}:{$listenporthttp}"; + else + $ourhostname = "{$ifip}:{$listenporthttp}"; } if ($orig_host != $ourhostname) {