<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>206954</bug_id>
          
          <creation_ts>2020-01-29 11:44:24 -0800</creation_ts>
          <short_desc>[curl] PublicSuffixCurl should skip leading dots</short_desc>
          <delta_ts>2020-02-06 14:32:20 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Platform</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Christopher Reid">chris.reid</reporter>
          <assigned_to name="Christopher Reid">chris.reid</assigned_to>
          <cc>basuke</cc>
    
    <cc>commit-queue</cc>
    
    <cc>don.olmstead</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>fujii</cc>
    
    <cc>galpeter</cc>
    
    <cc>ross.kirsling</cc>
    
    <cc>takashi.komori</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1612594</commentid>
    <comment_count>0</comment_count>
    <who name="Christopher Reid">chris.reid</who>
    <bug_when>2020-01-29 11:44:24 -0800</bug_when>
    <thetext>This test case is failing: EXPECT_EQ(String(&quot;test.com&quot;), topPrivatelyControlledDomain(&quot;.test.com&quot;));</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1612596</commentid>
    <comment_count>1</comment_count>
      <attachid>389168</attachid>
    <who name="Christopher Reid">chris.reid</who>
    <bug_when>2020-01-29 11:50:54 -0800</bug_when>
    <thetext>Created attachment 389168
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1613850</commentid>
    <comment_count>2</comment_count>
      <attachid>389168</attachid>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-02-02 18:52:30 -0800</bug_when>
    <thetext>Comment on attachment 389168
patch

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

&gt; Source/WebCore/platform/network/curl/PublicSuffixCurl.cpp:73
&gt; +    while (domainUTF8.data()[position] == &apos;.&apos;)

Do you really need to skip multiple leading dots?
I know you copied the implementation of PublicSuffixSoup.cpp.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1614075</commentid>
    <comment_count>3</comment_count>
    <who name="Christopher Reid">chris.reid</who>
    <bug_when>2020-02-03 12:01:18 -0800</bug_when>
    <thetext>(In reply to Fujii Hironori from comment #2)
&gt; Comment on attachment 389168 [details]
&gt; patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=389168&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/platform/network/curl/PublicSuffixCurl.cpp:73
&gt; &gt; +    while (domainUTF8.data()[position] == &apos;.&apos;)
&gt; 
&gt; Do you really need to skip multiple leading dots?
&gt; 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 &quot;..test.com&quot;. I&apos;m not sure if we have a case like that in practice though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1615817</commentid>
    <comment_count>4</comment_count>
      <attachid>389168</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2020-02-06 14:31:46 -0800</bug_when>
    <thetext>Comment on attachment 389168
patch

Clearing flags on attachment: 389168

Committed r255983: &lt;https://trac.webkit.org/changeset/255983&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1615818</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2020-02-06 14:31:48 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1615822</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-02-06 14:32:20 -0800</bug_when>
    <thetext>&lt;rdar://problem/59237548&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>389168</attachid>
            <date>2020-01-29 11:50:54 -0800</date>
            <delta_ts>2020-02-06 14:31:46 -0800</delta_ts>
            <desc>patch</desc>
            <filename>206954.diff</filename>
            <type>text/plain</type>
            <size>1999</size>
            <attacher name="Christopher Reid">chris.reid</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCBmNzEzMWQ2NjVjZi4uMTk1NzdmNzdhMWIgMTAwNjQ0Ci0tLSBhL1NvdXJj
ZS9XZWJDb3JlL0NoYW5nZUxvZworKysgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKQEAgLTEs
MyArMSwxNiBAQAorMjAyMC0wMS0yOSAgQ2hyaXN0b3BoZXIgUmVpZCAgPGNocmlzLnJlaWRAc29u
eS5jb20+CisKKyAgICAgICAgW2N1cmxdIFB1YmxpY1N1ZmZpeEN1cmwgc2hvdWxkIHNraXAgbGVh
ZGluZyBkb3RzCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9p
ZD0yMDY5NTQKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAg
ICBDb3ZlcmVkIGJ5IGV4aXN0aW5nIHR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RvbWFpbi5pc0FsbEFTQ0lJKCkpCiAgICAgICAg
IHJldHVybiBkb21haW47CiAKQEAgLTY0LDkgKzY2LDE5IEBAIFN0cmluZyB0b3BQcml2YXRlbHlD
b250cm9sbGVkRG9tYWluKGNvbnN0IFN0cmluZyYgZG9tYWluKQogICAgIGlmIChpc1B1YmxpY1N1
ZmZpeChsb3dlcmNhc2VEb21haW4pKQogICAgICAgICByZXR1cm4gU3RyaW5nKCk7CiAKKyAgICAv
LyBUaGlzIGZ1bmN0aW9uIGlzIGV4cGVjdGVkIHRvIHdvcmsgd2l0aCB0aGUgZm9ybWF0IHVzZWQg
YnkgY29va2llcywgc28gc2tpcCBhbnkgbGVhZGluZyBkb3RzLgorICAgIGF1dG8gZG9tYWluVVRG
OCA9IGxvd2VyY2FzZURvbWFpbi51dGY4KCk7CisKKyAgICB1bnNpZ25lZCBwb3NpdGlvbiA9IDA7
CisgICAgd2hpbGUgKGRvbWFpblVURjguZGF0YSgpW3Bvc2l0aW9uXSA9PSAnLicpCisgICAgICAg
IHBvc2l0aW9uKys7CisKKyAgICBpZiAocG9zaXRpb24gPT0gZG9tYWluVVRGOC5sZW5ndGgoKSkK
KyAgICAgICAgcmV0dXJuIFN0cmluZygpOworCiAgICAgY29uc3QgcHNsX2N0eF90KiBwc2wgPSBw
c2xfYnVpbHRpbigpOwogICAgIEFTU0VSVChwc2wpOwotICAgIHJldHVybiB0b3BQcml2YXRlbHlD
b250cm9sbGVkRG9tYWluSW50ZXJuYWwocHNsLCBsb3dlcmNhc2VEb21haW4udXRmOCgpLmRhdGEo
KSk7CisgICAgcmV0dXJuIHRvcFByaXZhdGVseUNvbnRyb2xsZWREb21haW5JbnRlcm5hbChwc2ws
IGRvbWFpblVURjguZGF0YSgpICsgcG9zaXRpb24pOwogfQogCiB9IC8vIG5hbWVzcGFjZSBXZWJD
b3JlCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>