Skip to content

Commit

Permalink
detect/http-server-body: avoid FP on toserver direction
Browse files Browse the repository at this point in the history
Ticket: 6948

http.response_body keyword did not enforce a direction, and thus
could match on files sent with POST requests
  • Loading branch information
catenacyber authored and victorjulien committed Apr 19, 2024
1 parent 08841f2 commit e6895b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/detect-http-server-body.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ static int DetectHttpServerBodySetupSticky(DetectEngineCtx *de_ctx, Signature *s
return -1;
if (DetectSignatureSetAppProto(s, ALPROTO_HTTP) < 0)
return -1;
// file data is on both directions, but we only take the one to client here
s->flags |= SIG_FLAG_TOCLIENT;
s->flags &= ~SIG_FLAG_TOSERVER;
return 0;
}

Expand Down

0 comments on commit e6895b8

Please sign in to comment.