]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
disallow http_server_body with flow:to_server
authorEileen Donlon <emdonlo@gmail.com>
Mon, 30 Apr 2012 15:56:09 +0000 (11:56 -0400)
committerVictor Julien <victor@inliniac.net>
Tue, 1 May 2012 14:11:30 +0000 (16:11 +0200)
disallow http_server_body with flow:to_server or from_client

src/detect-http-server-body.c

index 0b049c83e98fe3092c0eb3d5079d9c43a03ffd6e..32e1e435b08ccaa41e67a5df6087069b434c2ff6 100644 (file)
@@ -122,7 +122,10 @@ int DetectHttpServerBodySetup(DetectEngineCtx *de_ctx, Signature *s, char *arg)
                    "be used with the rawbytes rule keyword");
         return -1;
     }
-
+    if (s->init_flags & SIG_FLAG_INIT_FLOW && s->flags & SIG_FLAG_TOSERVER && !(s->flags & SIG_FLAG_TOCLIENT)) {
+        SCLogError(SC_ERR_INVALID_SIGNATURE, "http_server_body cannot be used with flow:to_server or from_client");
+        return -1;
+    }
     if (s->alproto != ALPROTO_UNKNOWN && s->alproto != ALPROTO_HTTP) {
         SCLogError(SC_ERR_CONFLICTING_RULE_KEYWORDS, "rule contains a non http "
                    "alproto set");