mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-15 20:39:44 -04:00
[BUG] config: fix erroneous check on cookie domain names, again
The previous check was correct: the RFC states that it is required to have a domain-name which contained a dot AND began with a dot. However, currently some (all?) browsers do not obey this specification, so such configuration might work. This patch reverts3d8fbb6658but changes the check from FATAL to WARNING and extends the message. (cherry picked from commit1a8bea9390)
This commit is contained in:
parent
5203a0b055
commit
39ece3d0f9
1 changed files with 5 additions and 5 deletions
|
|
@ -1296,13 +1296,13 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int inv)
|
|||
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 and does not start with a dot.\n",
|
||||
Warning("parsing [%s:%d]: domain '%s' contains no embedded"
|
||||
" dots nor does not start with a dot."
|
||||
" RFC forbids it, this configuration may not work properly.\n",
|
||||
file, linenum, args[cur_arg + 1]);
|
||||
err_code |= ERR_ALERT | ERR_FATAL;
|
||||
goto out;
|
||||
err_code |= ERR_WARN;
|
||||
}
|
||||
|
||||
err = invalid_domainchar(args[cur_arg + 1]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue