From fbd430172f49cb746975f5543c4e184748537b4e Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Sat, 2 Dec 2017 15:17:49 +0100 Subject: [PATCH] ids.cgi: Drop old code for uploading a ruleset Signed-off-by: Stefan Schantl --- html/cgi-bin/ids.cgi | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 9863251e2d..e7c00a5eb4 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -32,8 +32,6 @@ require "${General::swroot}/header.pl"; sub refreshpage{&Header::openbox( 'Waiting', 1, "" );print "

$Lang::tr{'pagerefresh'}
";&Header::closebox();} -$a = new CGI; - my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", \%mainsettings); @@ -60,7 +58,6 @@ $snortsettings{'RULES'} = ''; $snortsettings{'OINKCODE'} = ''; $snortsettings{'INSTALLDATE'} = ''; $snortsettings{'FILE'} = ''; -$snortsettings{'UPLOAD'} = ''; &Header::getcgihash(\%snortsettings, {'wantfile' => 1, 'filevar' => 'FH'}); @@ -307,7 +304,7 @@ if (!$errormessage) { # INSTALLMD5 is not in the form, so not retrieved by getcgihash &General::readhash("${General::swroot}/snort/settings", \%snortsettings); - if ($snortsettings{'ACTION'} eq $Lang::tr{'download new ruleset'} || $snortsettings{'ACTION'} eq $Lang::tr{'upload new ruleset'}) { + if ($snortsettings{'ACTION'} eq $Lang::tr{'download new ruleset'}) { my @df = `/bin/df -B M /var`; foreach my $line (@df) { next if $line =~ m/^Filesystem/; @@ -324,14 +321,6 @@ if (!$errormessage) { sleep(3); $return = `cat /var/tmp/log 2>/dev/null`; - } elsif ( $snortsettings{'ACTION'} eq $Lang::tr{'upload new ruleset'}) { - my $upload = $a->param("UPLOAD"); - open UPLOADFILE, ">/var/tmp/snortrules.tar.gz"; - binmode $upload; - while ( <$upload> ) { - print UPLOADFILE; - } - close UPLOADFILE; } if ($return =~ "ERROR") { -- 2.39.2