Bug 206954

Summary: [curl] PublicSuffixCurl should skip leading dots
Product: WebKit Reporter: Christopher Reid <chris.reid>
Component: PlatformAssignee: Christopher Reid <chris.reid>
Status: RESOLVED FIXED    
Severity: Normal CC: Basuke.Suzuki, commit-queue, don.olmstead, ews-watchlist, galpeter, Hironori.Fujii, ross.kirsling, takashi.komori, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch none

Description Christopher Reid 2020-01-29 11:44:24 PST
This test case is failing: EXPECT_EQ(String("test.com"), topPrivatelyControlledDomain(".test.com"));
Comment 1 Christopher Reid 2020-01-29 11:50:54 PST
Created attachment 389168 [details]
patch
Comment 2 Fujii Hironori 2020-02-02 18:52:30 PST
Comment on attachment 389168 [details]
patch

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

> Source/WebCore/platform/network/curl/PublicSuffixCurl.cpp:73
> +    while (domainUTF8.data()[position] == '.')

Do you really need to skip multiple leading dots?
I know you copied the implementation of PublicSuffixSoup.cpp.
Comment 3 Christopher Reid 2020-02-03 12:01:18 PST
(In reply to Fujii Hironori from comment #2)
> Comment on attachment 389168 [details]
> patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=389168&action=review
> 
> > Source/WebCore/platform/network/curl/PublicSuffixCurl.cpp:73
> > +    while (domainUTF8.data()[position] == '.')
> 
> Do you really need to skip multiple leading dots?
> I know you copied the implementation of PublicSuffixSoup.cpp.

Right, the main reason to keep the multiple skip in is to not diverge from Mac/Soup implementations for cases like "..test.com". I'm not sure if we have a case like that in practice though.
Comment 4 WebKit Commit Bot 2020-02-06 14:31:46 PST
Comment on attachment 389168 [details]
patch

Clearing flags on attachment: 389168

Committed r255983: <https://trac.webkit.org/changeset/255983>
Comment 5 WebKit Commit Bot 2020-02-06 14:31:48 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2020-02-06 14:32:20 PST
<rdar://problem/59237548>