Bug 206954 - [curl] PublicSuffixCurl should skip leading dots
Summary: [curl] PublicSuffixCurl should skip leading dots
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Christopher Reid
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-01-29 11:44 PST by Christopher Reid
Modified: 2020-02-06 14:32 PST (History)
9 users (show)

See Also:


Attachments
patch (1.95 KB, patch)
2020-01-29 11:50 PST, Christopher Reid
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>