]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ids.cgi: Drop old code for uploading a ruleset
authorStefan Schantl <stefan.schantl@ipfire.org>
Sat, 2 Dec 2017 14:17:49 +0000 (15:17 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Thu, 26 Jul 2018 09:39:40 +0000 (11:39 +0200)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/ids.cgi

index 9863251e2d8817f74211383b844f170a200af636..e7c00a5eb4e16afb5cabcac56d56924fb30f3374 100644 (file)
@@ -32,8 +32,6 @@ require "${General::swroot}/header.pl";
 
 sub refreshpage{&Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' content='1;'>" );print "<center><img src='/images/clock.gif' alt='' /><br/><font color='red'>$Lang::tr{'pagerefresh'}</font></center>";&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") {