Skip to content

Commit 5893553

Browse files
committed
added response code check for audit logs (not yet working)
1 parent bb322b1 commit 5893553

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

tests/modsecurity-config-custom-error-page.t

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ http {
6767
SecDebugLog %%TESTDIR%%/auditlog-debug-local.txt
6868
SecDebugLogLevel 9
6969
SecAuditEngine RelevantOnly
70-
SecAuditLogParts AB
70+
SecAuditLogParts ABIJDEFHZ
7171
SecAuditLog %%TESTDIR%%/auditlog-local.txt
7272
SecAuditLogType Serial
7373
SecAuditLogStorageDir %%TESTDIR%%/
@@ -86,7 +86,7 @@ http {
8686
SecDebugLog %%TESTDIR%%/auditlog-debug-global.txt
8787
SecDebugLogLevel 9
8888
SecAuditEngine RelevantOnly
89-
SecAuditLogParts AB
89+
SecAuditLogParts ABIJDEFHZ
9090
SecAuditLog %%TESTDIR%%/auditlog-global.txt
9191
SecAuditLogType Serial
9292
SecAuditLogStorageDir %%TESTDIR%%/
@@ -114,7 +114,7 @@ mkdir($t->testdir() . '/http');
114114
$t->write_file("/http/403.html", $custom_txt);
115115

116116
$t->run();
117-
$t->plan(8);
117+
$t->plan(10);
118118

119119
###############################################################################
120120

@@ -157,6 +157,14 @@ like($t4, qr/$index_txt/, 'ModSecurity at server / other');
157157
like($global, qr/what=root/, 'ModSecurity at server / root present in auditlog');
158158
unlike($global, qr/what=other/, 'ModSecurity at server / other not present in auditlog');
159159

160+
TODO: {
161+
local $TODO = 'not yet';
162+
163+
like($local, qr/Access denied with code 403/, 'ModSecurity at location / 403 in auditlog');
164+
like($global, qr/Access denied with code 403/, 'ModSecurity at server / 403 in auditlog');
165+
166+
}
167+
160168
###############################################################################
161169

162170
sub http_get_host {

0 commit comments

Comments
 (0)