]> git.kaiwu.me - haproxy.git/commitdiff
BUG/MINOR: ocsp: Fix too strict parser of 'do-ocsp-request' action
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Tue, 1 Dec 2026 13:33:37 +0000 (14:33 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 1 Dec 2026 13:45:10 +0000 (14:45 +0100)
The parsing function of the 'do-ocsp-request' action raised an error on
any argument different than the expected 'reason-var' and 'status-var'
ones, but it prevented any 'if' condition from being added at the end.

This patch does not need to be backported.

src/ssl_ocsp.c

index f539d8bb981990f7cc45dea7e1fb406548f8b5bb..3b06dc1710e29d1b58518a450579d4e080bb511b 100644 (file)
@@ -2166,7 +2166,7 @@ static inline void release_do_ocsp_request_action(struct act_rule *rule)
 
 /*
  * Parse the 'do-ocsp-request' action.
- *     do-ocsp-request [ status-var <varname> ] [ reason-var <varname> ] [ no-deny | deny ]
+ *     do-ocsp-request [ status-var <varname> ] [ reason-var <varname> ]
  */
 static enum act_parse_ret parse_do_ocsp_request(const char **args, int *orig_arg, struct proxy *px,
                                                 struct act_rule *rule, char **err)
@@ -2202,7 +2202,7 @@ static enum act_parse_ret parse_do_ocsp_request(const char **args, int *orig_arg
                        if (!istlen(conf->reason_var))
                                goto parse_err;
                } else
-                       goto parse_err;
+                       break;
 
                ++cur_arg;
        }