summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/etc/inc/pfsense-utils.inc37
-rwxr-xr-xsrc/usr/local/www/firewall_aliases_edit.php2
2 files changed, 0 insertions, 39 deletions
diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc
index 2144593..87039f6 100644
--- a/src/etc/inc/pfsense-utils.inc
+++ b/src/etc/inc/pfsense-utils.inc
@@ -1999,10 +1999,6 @@ function update_alias_url_data() {
if (!process_alias_tgz($temp_filename)) {
continue;
}
- } else if (stripos($alias_url, '.zip')) {
- if (!process_alias_unzip($temp_filename)) {
- continue;
- }
}
if (file_exists("{$temp_filename}/aliases")) {
$address = parse_aliases_file("{$temp_filename}/aliases", $alias['type'], 5000);
@@ -2021,39 +2017,6 @@ function update_alias_url_data() {
return $updated;
}
-function process_alias_unzip($temp_filename) {
- if (!file_exists("/usr/local/bin/unzip")) {
- log_error(gettext("Alias archive is a .zip file which cannot be decompressed because utility is missing!"));
- return false;
- }
- rename("{$temp_filename}/aliases", "{$temp_filename}/aliases.zip");
- mwexec("/usr/local/bin/unzip {$temp_filename}/aliases.tgz -d {$temp_filename}/aliases/");
- unlink("{$temp_filename}/aliases.zip");
- $files_to_process = return_dir_as_array("{$temp_filename}/");
- /* foreach through all extracted files and build up aliases file */
- $fd = @fopen("{$temp_filename}/aliases", "w");
- if (!$fd) {
- log_error(gettext("Could not open {$temp_filename}/aliases for writing!"));
- return false;
- }
- foreach ($files_to_process as $f2p) {
- $tmpfd = @fopen($f2p, 'r');
- if (!$tmpfd) {
- log_error(gettext("The following file could not be read {$f2p} from {$temp_filename}"));
- continue;
- }
- while (($tmpbuf = fread($tmpfd, 65536)) !== FALSE) {
- fwrite($fd, $tmpbuf);
- }
- fclose($tmpfd);
- unlink($f2p);
- }
- fclose($fd);
- unset($tmpbuf);
-
- return true;
-}
-
function process_alias_tgz($temp_filename) {
if (!file_exists('/usr/bin/tar')) {
log_error(gettext("Alias archive is a .tar/tgz file which cannot be decompressed because utility is missing!"));
diff --git a/src/usr/local/www/firewall_aliases_edit.php b/src/usr/local/www/firewall_aliases_edit.php
index a071b01..57d5fab 100755
--- a/src/usr/local/www/firewall_aliases_edit.php
+++ b/src/usr/local/www/firewall_aliases_edit.php
@@ -260,8 +260,6 @@ if ($_POST) {
/* if the item is tar gzipped then extract */
if (stristr($_POST['address' . $x], ".tgz")) {
process_alias_tgz($temp_filename);
- } else if (stristr($_POST['address' . $x], ".zip")) {
- process_alias_unzip($temp_filename);
}
if (!isset($alias['aliasurl'])) {
OpenPOWER on IntegriCloud