From 3d8fbb6658d4414dac20892bbd9e79e14e99e67f Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 3 Dec 2009 23:10:56 +0100 Subject: [PATCH] [BUG] config: fix erroneous check on cookie domain names It was a OR instead of a AND, so it was required to have a cookie name which contained a dot AND began with a dot. (cherry picked from commit a1e107fc13e5d8886bf900f302322bfa6ed35d37) --- src/cfgparse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cfgparse.c b/src/cfgparse.c index 91a20bdf1..f7b6a04db 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -1454,10 +1454,10 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm) goto out; } - if (*args[cur_arg + 1] != '.' || !strchr(args[cur_arg + 1] + 1, '.')) { + if (*args[cur_arg + 1] != '.' && !strchr(args[cur_arg + 1] + 1, '.')) { /* rfc2109, 4.3.2 Rejecting Cookies */ Alert("parsing [%s:%d]: domain '%s' contains no embedded" - " dots or does not start with a dot.\n", + " dots and does not start with a dot.\n", file, linenum, args[cur_arg + 1]); err_code |= ERR_ALERT | ERR_FATAL; goto out;