From: Pieter Baauw Date: Sat, 13 Feb 2016 14:51:58 +0000 (+0100) Subject: MEDIUM: cfgparse: reject incorrect 'timeout retry' keyword spelling in resolvers X-Git-Tag: v1.7-dev2~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a91a0e1e52552b0c90506b9e5da1eceb9f23a38;p=thirdparty%2Fhaproxy.git MEDIUM: cfgparse: reject incorrect 'timeout retry' keyword spelling in resolvers If for example it was written as 'timeout retri 1s' or 'timeout wrong 1s' this would be used for the retry timeout value. Resolvers section only timeout setting currently is 'retry', others are still parsed as before this patch to not break existing configurations. A less strict version will be backported to 1.6. --- diff --git a/src/cfgparse.c b/src/cfgparse.c index d44f57a43f..99e97c7de5 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -2438,23 +2438,37 @@ int cfg_parse_resolvers(const char *file, int linenum, char **args, int kwm) curr_resolvers->resolve_retries = atoi(args[1]); } else if (strcmp(args[0], "timeout") == 0) { - const char *res; - unsigned int timeout_retry; - - if (!*args[2]) { + if (!*args[1]) { Alert("parsing [%s:%d] : '%s' expects 'retry' and