[Webkit-unassigned] [Bug 182328] [SOUP] Ensure domain is valid when converting a WebCore Cookie to Soup

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 31 14:00:39 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=182328

--- Comment #2 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Comment on attachment 332753
  --> https://bugs.webkit.org/attachment.cgi?id=332753
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=332753&action=review

> Source/WebCore/platform/network/soup/CookieSoup.cpp:66
> +    // soup_cookie_new() will handle the given domain as a hostname if it doesn't start with '.'.
> +    auto cookieDomain = domain.utf8();
> +    if (cookieDomain.length() && !g_hostname_is_ip_address(cookieDomain.data()) && cookieDomain.data()[0] != '.')
> +        cookieDomain = makeString('.', domain).utf8();

I don't know. RFC 2965 says:

   Domain=value
      OPTIONAL.  The value of the Domain attribute specifies the domain
      for which the cookie is valid.  If an explicitly specified value
      does not start with a dot, the user agent supplies a leading dot

The dot is actually significant and probably shouldn't change when converting from a WebCore::Cookie to SoupCookie. I'm worried that the dot should have already been prepended somewhere else.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180131/396650cd/attachment.html>


More information about the webkit-unassigned mailing list