diff options
author | Stephen Beaver <sbeaver@etsec.com> | 2015-03-25 13:24:25 -0400 |
---|---|---|
committer | Stephen Beaver <sbeaver@etsec.com> | 2015-03-25 13:24:25 -0400 |
commit | d5b28fcf94d5db726f8e5d9e1e80662df215b733 (patch) | |
tree | 6dd283a97c5383f31d87f8e46da27a755c878992 /usr | |
parent | a3cecbc37572679807fdb4aa7acb0c606cb5b178 (diff) | |
download | pfsense-d5b28fcf94d5db726f8e5d9e1e80662df215b733.zip pfsense-d5b28fcf94d5db726f8e5d9e1e80662df215b733.tar.gz |
Fixes an issue wherein an alias could be added only if some other alias already exists in the system.
Diffstat (limited to 'usr')
-rw-r--r-- | usr/local/www/diag_dns.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/local/www/diag_dns.php b/usr/local/www/diag_dns.php index d99c5ba..cbce9aa 100644 --- a/usr/local/www/diag_dns.php +++ b/usr/local/www/diag_dns.php @@ -38,11 +38,13 @@ require("guiconfig.inc"); $host = trim($_REQUEST['host'], " \t\n\r\0\x0B[];\"'"); $host_esc = escapeshellarg($host); -if (is_array($config['aliases']['alias'])) { - $a_aliases = &$config['aliases']['alias']; -} else { - $a_aliases = array(); +/* If this section of config.xml has not been populated yet we need to set it up +*/ +if (!is_array($config['aliases']['alias'])) { + $config['aliases']['alias'] = array(); } +$a_aliases = &$config['aliases']['alias']; + $aliasname = str_replace(array(".","-"), "_", $host); $alias_exists = false; $counter=0; |