diff options
author | Luiz Otavio O Souza <luiz@netgate.com> | 2016-12-21 10:44:08 -0600 |
---|---|---|
committer | Luiz Otavio O Souza <luiz@netgate.com> | 2016-12-21 10:53:25 -0600 |
commit | f763ca6e4d2e7c0ec3a19ea23356467e7e51b91b (patch) | |
tree | 244ecf5334199e6aba698492b7e3e211fe682f95 /src/usr/local/www/firewall_aliases_edit.php | |
parent | 426522b35224faf747becb5a7102a1e4b29c794d (diff) | |
download | pfsense-f763ca6e4d2e7c0ec3a19ea23356467e7e51b91b.zip pfsense-f763ca6e4d2e7c0ec3a19ea23356467e7e51b91b.tar.gz |
Print an error when the given URL cannot be fetched instead of just ignoring it.
Fix an use of an uninitialized variable.
Ticket #4766
Diffstat (limited to 'src/usr/local/www/firewall_aliases_edit.php')
-rw-r--r-- | src/usr/local/www/firewall_aliases_edit.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/usr/local/www/firewall_aliases_edit.php b/src/usr/local/www/firewall_aliases_edit.php index 12649c4..bece596 100644 --- a/src/usr/local/www/firewall_aliases_edit.php +++ b/src/usr/local/www/firewall_aliases_edit.php @@ -226,6 +226,7 @@ if ($_POST) { $verify_ssl = isset($config['system']['checkaliasesurlcert']); mkdir($temp_filename); if (!download_file($_POST['address' . $x], $temp_filename . "/aliases", $verify_ssl)) { + $input_errors[] = sprintf(gettext("Could not fetch the URL '%s'."), $_POST['address' . $x]); continue; } @@ -520,7 +521,7 @@ if ($_POST) { //we received input errors, copy data to prevent retype $pconfig['name'] = $_POST['name']; $pconfig['descr'] = $_POST['descr']; - if (($_POST['type'] == 'url') || ($_POST['type'] == 'url_ports')) { + if (isset($alias['aliasurl']) && ($_POST['type'] == 'url') || ($_POST['type'] == 'url_ports')) { $pconfig['address'] = implode(" ", $alias['aliasurl']); } else { $pconfig['address'] = implode(" ", $address); |