From 5ba3e52835ab05e52e6bc7522fb50e0e5351c952 Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Tue, 15 May 2012 21:32:47 +0530 Subject: [PATCH] bug #461 - http header shouldn't match on cookie header --- src/detect-engine-hhd.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/detect-engine-hhd.c b/src/detect-engine-hhd.c index d9b74f4..e304da9 100644 --- a/src/detect-engine-hhd.c +++ b/src/detect-engine-hhd.c @@ -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) { -- 1.7.1