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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 27 03:03:21 PST 2019


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

--- Comment #38 from Fujii Hironori <Hironori.Fujii at sony.com> ---
Comment on attachment 362979
  --> https://bugs.webkit.org/attachment.cgi?id=362979
Patch

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

>>> 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 the condition is valid.
> 
> See constructor of RegistrableDomain in RegistrableDomain.h and topPrivatelyControlledDomain() in PublicSuffixCurl.cpp.

That's right.

That means we can't distinguish if a RegistrableDomain is eTLD+1 or unkown TLD. 
I'm wondering this can be a problem...

>>>> Source/WebCore/platform/network/curl/PublicSuffixCurl.cpp:-29
>>>> -#if ENABLE(PUBLIC_SUFFIX_LIST)
>>> 
>>> This ENABLE(PUBLIC_SUFFIX_LIST) check should be kept. It's common in WebKit to have ENABLE checks in their respective implementaion files.
>> 
>> I don't think so because this is a curl port specific file and all curl ports are defining ENABLE_PUBLIC_SUFFIX_LIST.
> 
> Isn't that also the case for PublicSuffixMac.mm and PublicSuffixSoup.cpp? Those files also have the enable check. I'm not sure what we gain by removing the check in this file and removing it makes disabling the flag on curl more involved.

I get your idea. I don't have a strong opinion. Other *Curl.cpp files are using "#if USE(CURL)". How about it?

-- 
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/20190227/a8fd5336/attachment.html>


More information about the webkit-unassigned mailing list