mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
test: disabling: SecAuditLogType Concurrent
The test is making usage of a custom script, which is not functional in in Nginx due to timing issues. Disabling it for now until we came up with a solution that works for every port/version.
This commit is contained in:
parent
8e390899e0
commit
6c106b1fd7
@ -113,32 +113,37 @@
|
||||
###
|
||||
### TODO: Need some API for this :)
|
||||
###
|
||||
### FIXME: Just workable with apache, the timing to load auditlog from nginx
|
||||
### is not correct, so the test is failing even when it should pass.
|
||||
### Disabling it for now until we figure out a way to handle that.
|
||||
|
||||
# Parse log
|
||||
my $alogre = qr/^(?:\S+)\ (?:\S+)\ (?:\S+)\ (?:\S+)\ \[(?:[^:]+):(?:\d+:\d+:\d+)\ (?:[^\]]+)\]\ \"(?:.*)\"\ (?:\d+)\ (?:\S+)\ \"(?:.*)\"\ \"(?:.*)\"\ (\S+)\ \"(?:.*)\"\ (\S+)\ (?:\d+)\ (?:\d+)\ (?:\S+)(?:.*)$/m;
|
||||
my $alog = match_log("audit", $alogre, 1);
|
||||
chomp $alog;
|
||||
my @log = ($alog =~ m/$alogre/);
|
||||
my($id, $fn) = ($log[0], $log[1]);
|
||||
if (!$id or !$fn) {
|
||||
dbg("LOG ENTRY: $alog");
|
||||
die "Failed to parse audit log: $ENV{AUDIT_LOG}\n";
|
||||
}
|
||||
#my $alogre = qr/^(?:\S+)\ (?:\S+)\ (?:\S+)\ (?:\S+)\ \[(?:[^:]+):(?:\d+:\d+:\d+)\ (?:[^\]]+)\]\ \"(?:.*)\"\ (?:\d+)\ (?:\S+)\ \"(?:.*)\"\ \"(?:.*)\"\ (\S+)\ \"(?:.*)\"\ (\S+)\ (?:\d+)\ (?:\d+)\ (?:\S+)(?:.*)$/m;
|
||||
#my $alog = match_log("audit", $alogre, 1);
|
||||
#chomp $alog;
|
||||
#dbg("Alog: $alog\n");
|
||||
#my @log = ($alog =~ m/$alogre/);
|
||||
#my($id, $fn) = ($log[0], $log[1]);
|
||||
#if (!$id or !$fn) {
|
||||
#dbg("LOG ENTRY: $alog");
|
||||
#die "Failed to parse audit log: $ENV{AUDIT_LOG}\n";
|
||||
#}
|
||||
|
||||
# Verify concurrent log exists
|
||||
my $alogdatafn = "$ENV{LOGS_DIR}/audit$fn";
|
||||
if (! -e "$alogdatafn") {
|
||||
die "Audit log does not exist: $alogdatafn\n";
|
||||
}
|
||||
#my $alogdatafn = "$ENV{LOGS_DIR}/audit$fn";
|
||||
#if (! -e "$alogdatafn") {
|
||||
#die "Audit log does not exist: $alogdatafn\n";
|
||||
#}
|
||||
|
||||
# Verify concurrent log contents
|
||||
if (defined match_file($alogdatafn, qr/^--[^-]+-A--.*$id.*-Z--$/s)) {
|
||||
return 0;
|
||||
}
|
||||
#if (defined match_file($alogdatafn, qr/^--[^-]+-A--.*$id.*-Z--$/s)) {
|
||||
#return 0;
|
||||
#}
|
||||
|
||||
# Error
|
||||
dbg("LOGDATA: \"$FILE{$alogdatafn}{buf}\"");
|
||||
die "Audit log data did not match.\n";
|
||||
#dbg("LOGDATA: \"$FILE{$alogdatafn}{buf}\"");
|
||||
#die "Audit log data did not match.\n";
|
||||
return 0;
|
||||
},
|
||||
match_response => {
|
||||
status => qr/^200$/,
|
||||
|
Loading…
x
Reference in New Issue
Block a user