]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http-act: Fix parsing of the expression argument for pause action
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 4 Jul 2025 12:34:08 +0000 (14:34 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 4 Jul 2025 12:38:32 +0000 (14:38 +0200)
When the "pause" action is parsed, if an expression is used instead of a
static value, the position of the current argument after the expression
evaluation is incremented while it should not. The sample_parse_expr()
function already take care of it. However, it should still be incremented
when an time value was parsed.

This patch must be backported to 3.2.

src/http_act.c

index 106349f7ca97a06a709f5327d8d7c7093931c676..30ed8053ee08982f761b6908bd1af2266655148d 100644 (file)
@@ -1822,8 +1822,12 @@ static enum act_parse_ret parse_http_pause(const char **args, int *orig_arg, str
                 memprintf(err, "null value is not valid for a 'pause' rule");
                 return ACT_RET_PRS_ERR;
         }
+       else {
+               /* a time volue was successfully parsed */
+               cur_arg++;
+       }
 
-       *orig_arg = cur_arg + 1;
+       *orig_arg = cur_arg;
        return ACT_RET_PRS_OK;
 }