summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/system.inc
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-01-07 11:45:12 -0200
committerRenato Botelho <renato@netgate.com>2016-01-07 11:45:36 -0200
commit716d10e0eb8533019d12c9316ab66044906a76e1 (patch)
treec1009e71c9ecfd75cf70956524eaa2203d4056e5 /src/etc/inc/system.inc
parent38c575a3ddae3764a328236556a63ca5e7f7a13f (diff)
downloadpfsense-716d10e0eb8533019d12c9316ab66044906a76e1.zip
pfsense-716d10e0eb8533019d12c9316ab66044906a76e1.tar.gz
Make sure httpsname is a valid domain to avoid breaking nginx conf
Diffstat (limited to 'src/etc/inc/system.inc')
-rw-r--r--src/etc/inc/system.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc
index 9d02a1e..30f7410 100644
--- a/src/etc/inc/system.inc
+++ b/src/etc/inc/system.inc
@@ -1182,7 +1182,8 @@ function system_generate_nginx_config($filename,
$cp_hostcheck .= "\t\t}\n";
}
}
- if (isset($config['captiveportal'][$captive_portal]['httpsname'])) {
+ if (isset($config['captiveportal'][$captive_portal]['httpsname']) &&
+ is_domain($config['captiveportal'][$captive_portal]['httpsname'])) {
$cp_hostcheck .= "\t\tif (\$http_host = {$config['captiveportal'][$captive_portal]['httpsname']}) {\n";
$cp_hostcheck .= "\t\t\tset \$cp_redirect no;\n";
$cp_hostcheck .= "\t\t}\n";
OpenPOWER on IntegriCloud