Hello Charles,
a big thanks for pointing this regression out. I've introduced this by one of my latest IDS related fixes :(
I'll send a patch to the list to fix this issue.
Best regards,
-Stefan
Hi Stefan,
In case you had not noticed ... after fresh install of latest next/cad86575 ...
Web page ids.cgi stops loading after header. The page header down through "Intrusion Prevention System <?>" is displayed and then stops -- nothing else on the page
Log in httpd error shows as:
"Unable to read file /var/ipfire/suricata/ignored at /var/ipfire/general-functions.pl line 883."
I went to the directory and touched "ignored" file and chowned it to nobody:nobody. That allowed the page to complete loading
I don't know if the chown was necessary -- I didn't try reloading the page before doing it.
Cheers, Charles Brown
Otherwise the CGI will crash.
Signed-off-by: Stefan Schantl stefan.schantl@ipfire.org --- html/cgi-bin/ids.cgi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 27e61e9bb..722715667 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -103,7 +103,7 @@ if (($cgiparams{'WHITELIST'} eq $Lang::tr{'add'}) || ($cgiparams{'WHITELIST'} eq my $new_entry_remark = $cgiparams{'IGNORE_ENTRY_REMARK'};
# Read-in ignoredfile. - &General::readhasharray($IDS::ignored_file, %ignored); + &General::readhasharray($IDS::ignored_file, %ignored) if (-e $IDS::ignored_file);
# Check if we should edit an existing entry and got an ID. if (($cgiparams{'WHITELIST'} eq $Lang::tr{'update'}) && ($cgiparams{'ID'})) { @@ -165,7 +165,7 @@ if (($cgiparams{'WHITELIST'} eq $Lang::tr{'add'}) || ($cgiparams{'WHITELIST'} eq undef($cgiparams{'ID'});
# Read-in ignoredfile. - &General::readhasharray($IDS::ignored_file, %ignored); + &General::readhasharray($IDS::ignored_file, %ignored) if (-e $IDS::ignored_file);
# Grab the configured status of the corresponding entry. my $status = $ignored{$id}[2]; @@ -199,7 +199,7 @@ if (($cgiparams{'WHITELIST'} eq $Lang::tr{'add'}) || ($cgiparams{'WHITELIST'} eq my %ignored = ();
# Read-in ignoredfile. - &General::readhasharray($IDS::ignored_file, %ignored); + &General::readhasharray($IDS::ignored_file, %ignored) if (-e $IDS::ignored_file);
# Drop entry from the hash. delete($ignored{$cgiparams{'ID'}}); @@ -1071,7 +1071,7 @@ sub show_mainpage() { }
# Read-in ignored hosts. - &General::readhasharray("$IDS::settingsdir/ignored", %ignored); + &General::readhasharray("$IDS::ignored_file", %ignored) if (-e $IDS::ignored_file);
$checked{'ENABLE_IDS'}{'off'} = ''; $checked{'ENABLE_IDS'}{'on'} = '';