]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/urilen: fix applying urilen as depth
authorVictor Julien <vjulien@oisf.net>
Thu, 23 Mar 2023 14:42:18 +0000 (15:42 +0100)
committerVictor Julien <vjulien@oisf.net>
Tue, 28 Mar 2023 08:30:05 +0000 (10:30 +0200)
If urilen induced depth was set, later DetectContentPropagateLimits()
would apply a wrong depth setting, leading to a false negative in
some cases.

Bug: #5929.
(cherry picked from commit ba7db2583b0d96627d3088dd3d89b69ad21ff757)

src/detect-urilen.c

index 0a507840ec865be17367637cbc32344b88108c4c..efe0afe26d63a0bc9d13c3fe4f0810e60cd0e40d 100644 (file)
@@ -336,6 +336,7 @@ void DetectUrilenApplyToContent(Signature *s, int list)
 
         if (cd->depth == 0 || cd->depth > high) {
             cd->depth = (uint16_t)high;
+            cd->flags |= DETECT_CONTENT_DEPTH;
             SCLogDebug("updated %u, content %u to have depth %u "
                     "because of urilen.", s->id, cd->id, cd->depth);
         }