Closed pavel-mikhalchuk closed 4 years ago
True, according to RFC2109 a cookie should be rejected if its request url does not domain-match the domain string. RFC6265 states, that a request url domain-matches a domain string, if the domain string is a suffix of the hostname of the request url.
So a cookie received from foo.bar
can be set for the domain bar
, but a cookie received from bar
can't be set for foo.bar
.
As you correctly noticed, the existing code checks it the other way around. Thanks for the fix!
Fixing the order of parameters passed to "validateHostname" method.