mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
BUG/MINOR: ssl: verifyhost does not match empty strings on wildcard.
RFC6125 does not specify if wildcard matches empty strings but classical browsers implementations does. After the fix foo*bar.exemple.om matches foobar.exemple.com.
This commit is contained in:
parent
a848dae3f0
commit
369da8565a
@ -811,7 +811,7 @@ static int ssl_sock_srv_hostcheck(const char *pattern, const char *hostname)
|
||||
|
||||
/* Make sure the leftmost label of the hostname is long enough
|
||||
* that the wildcard can match */
|
||||
if (hostname_left_label_end - hostname < pattern_left_label_end - pattern)
|
||||
if (hostname_left_label_end - hostname < (pattern_left_label_end - pattern) - 1)
|
||||
return 0;
|
||||
|
||||
/* Finally compare the string on either side of the
|
||||
|
Loading…
x
Reference in New Issue
Block a user