]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
bug #461 - http header shouldn't match on cookie header
authorAnoop Saldanha <poonaatsoc@gmail.com>
Tue, 15 May 2012 16:02:47 +0000 (21:32 +0530)
committerVictor Julien <victor@inliniac.net>
Wed, 16 May 2012 09:51:21 +0000 (11:51 +0200)
src/detect-engine-hhd.c

index d9b74f4dff870a623f63dec0aaa058536b9cd807..e304da9d5ae5602185fd349bf363700b567e3433 100644 (file)
@@ -45,6 +45,7 @@
 #include "flow-util.h"
 #include "util-debug.h"
 #include "util-print.h"
+#include "util-memcmp.h"
 #include "flow.h"
 
 #include "app-layer-parser.h"
@@ -137,6 +138,11 @@ static void DetectEngineBufferHttpHeaders(DetectEngineThreadCtx *det_ctx, Flow *
             size_t size1 = bstr_size(h->name);
             size_t size2 = bstr_size(h->value);
 
+            if (size1 == 6 &&
+                SCMemcmpLowercase(bstr_ptr(h->name), "Cookie", 6) == 0) {
+                continue;
+            }
+
             /* the extra 4 bytes if for ": " and "\r\n" */
             headers_buffer = SCRealloc(headers_buffer, headers_buffer_len + size1 + size2 + 4);
             if (headers_buffer == NULL) {