From: Stefan Schantl Date: Sat, 2 Dec 2017 14:17:49 +0000 (+0100) Subject: ids.cgi: Drop old code for uploading a ruleset X-Git-Tag: suricata-beta3~33^2~39^2~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fbd430172f49cb746975f5543c4e184748537b4e;p=people%2Fstevee%2Fipfire-2.x.git ids.cgi: Drop old code for uploading a ruleset Signed-off-by: Stefan Schantl --- 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") {