aboutsummaryrefslogtreecommitdiffstats
path: root/packages/snort/snort_download_rules.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-09-25 03:47:38 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-09-25 03:47:38 +0000
commitd99dbd182f70c192ae1dd856ab46e50341cfd06d (patch)
tree7df3c371f0dc2f0172c1c0abe4fde72cf5976e42 /packages/snort/snort_download_rules.php
parent9b37179e5c5c8c274041faeb8bc7f15f47bb1ac2 (diff)
downloadpfsense-packages-d99dbd182f70c192ae1dd856ab46e50341cfd06d.tar.gz
pfsense-packages-d99dbd182f70c192ae1dd856ab46e50341cfd06d.tar.bz2
pfsense-packages-d99dbd182f70c192ae1dd856ab46e50341cfd06d.zip
Only check for errors if the downloaded file is less than 1500 bytes
Diffstat (limited to 'packages/snort/snort_download_rules.php')
-rw-r--r--packages/snort/snort_download_rules.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/snort/snort_download_rules.php b/packages/snort/snort_download_rules.php
index 1dea97f4..701fb4d1 100644
--- a/packages/snort/snort_download_rules.php
+++ b/packages/snort/snort_download_rules.php
@@ -128,7 +128,7 @@ $static_output = gettext("Your snort rules are now up to date.");
update_all_status($static_output);
/* cleanup temporary directory */
-//exec("rm -rf {$tmpfname};");
+exec("rm -rf {$tmpfname};");
/* hide progress bar and lets end this party */
hide_progress_bar_status();
@@ -161,8 +161,10 @@ function scroll_down_to_bottom_of_page() {
}
function verify_downloaded_file($filename) {
- update_all_status("Checking {$filename}...");
- check_for_common_errors($filename);
+ if(filesize($filename)<1500) {
+ update_all_status("Checking {$filename}...");
+ check_for_common_errors($filename);
+ }
update_all_status("Verifying {$filename}...");
if(!file_exists($filename)) {
update_all_status("Could not fetch snort rules ({$filename}). Check oinkid key and dns and try again.");