[Webkit-unassigned] [Bug 191645] [Curl] Implement Cookie Accept Policy.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 28 01:21:33 PST 2019


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

--- Comment #50 from Takashi Komori <Takashi.Komori at sony.com> ---
(In reply to Fujii Hironori from comment #32)
> > Source/WebCore/platform/network/curl/CookieJarDB.cpp:339
> > +        return false;
> 
> Oh, this returns too early. This makes the following condition
> 'CookieUtil::isIPAddress(host) || !host.contains('.')' useless.
> My comment 27 was bad. I think you should use isPublicSuffix as well as
> CookieJarDB::canAcceptCookie does.
> 
> if (isPublicSuffix(host))
>    return false;
> 
> if (registrableDomain.isEmpty()) {
>     statement.bindText(1, host);
>     statement.bindNull(2);
> } else {
>     statement.bindText(1, registrableDomain.string());
>     statement.bindText(2, String("*.") + registrableDomain.string());
> }

RegistrableDomain returns a IP address or 'localhost'.
So, we should check below.

if (CookieUtil::isIPAddress(host) || !host.contains('.') || registrableDomain.isEmpty()) {
    ....
} 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/20190228/496be7b0/attachment-0001.html>


More information about the webkit-unassigned mailing list