<?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>222856</bug_id>
          
          <creation_ts>2021-03-05 21:32:45 -0800</creation_ts>
          <short_desc>REGRESSION (r273541): Payloads requiring NSURL in serialization fail</short_desc>
          <delta_ts>2021-03-09 11:06:03 -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>WebKit Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=222957</see_also>
          <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="Brent Fulgham">bfulgham</reporter>
          <assigned_to name="Brent Fulgham">bfulgham</assigned_to>
          <cc>achristensen</cc>
    
    <cc>aestes</cc>
    
    <cc>bfulgham</cc>
    
    <cc>darin</cc>
    
    <cc>ggaren</cc>
    
    <cc>sam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1736748</commentid>
    <comment_count>0</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2021-03-05 21:32:45 -0800</bug_when>
    <thetext>In Bug 222145 I converted serialization od CFURLRequest to NSURLRequest. As part of that change, I used a new encoder (WKSecureCodingURLWrapper) to wrap the NSURL to ensure proper handling of encoded URLs.

I should have declared the WKSecureCodingURLWrapper as a subclass of NSURL, so that NSSecureCoding would respect it as a valid way of serializing an NSURL.

This patch corrects that oversight.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1736749</commentid>
    <comment_count>1</comment_count>
      <attachid>422473</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2021-03-05 21:36:48 -0800</bug_when>
    <thetext>Created attachment 422473
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1736929</commentid>
    <comment_count>2</comment_count>
      <attachid>422473</attachid>
    <who name="Sam Weinig">sam</who>
    <bug_when>2021-03-07 09:03:30 -0800</bug_when>
    <thetext>Comment on attachment 422473
Patch

Can we test this somehow? Perhaps via some ArgumentCoder API/Unit tests?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1737195</commentid>
    <comment_count>3</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2021-03-08 11:47:58 -0800</bug_when>
    <thetext>(In reply to Sam Weinig from comment #2)
&gt; Comment on attachment 422473 [details]
&gt; Patch
&gt; 
&gt; Can we test this somehow? Perhaps via some ArgumentCoder API/Unit tests?

We could, if such infrastructure existed. It doesn&apos;t appear to.

We would have caught this if there were tests for Apple Pay PaymentSetupConfiguration, but there don&apos;t appear to be any. It might require special server stuff to do so.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1737289</commentid>
    <comment_count>4</comment_count>
      <attachid>422473</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2021-03-08 14:11:51 -0800</bug_when>
    <thetext>Comment on attachment 422473
Patch

It’s bad that there is no test. It’s non-obvious that this is required. It’s strange that all the fields of NSURL are allocated and all the methods of NSURL are available on this object.

But we should land this code quickly to fix the major regression and think about those other things afterward.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1737290</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2021-03-08 14:12:42 -0800</bug_when>
    <thetext>(In reply to Brent Fulgham from comment #3)
&gt; &gt; Can we test this somehow? Perhaps via some ArgumentCoder API/Unit tests?
&gt; 
&gt; We could, if such infrastructure existed. It doesn&apos;t appear to.
&gt; 
&gt; We would have caught this if there were tests for Apple Pay
&gt; PaymentSetupConfiguration, but there don&apos;t appear to be any. It might
&gt; require special server stuff to do so.

I feel like we need to add this testing. It’s not optional. Every test we wrote was hard at first, time to make this testable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1737299</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2021-03-08 14:39:22 -0800</bug_when>
    <thetext>Committed r274109: &lt;https://commits.webkit.org/r274109&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 422473.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1737301</commentid>
    <comment_count>7</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-03-08 14:40:25 -0800</bug_when>
    <thetext>&lt;rdar://problem/75188264&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1737669</commentid>
    <comment_count>8</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2021-03-09 11:05:10 -0800</bug_when>
    <thetext>(In reply to Sam Weinig from comment #2)
&gt; Comment on attachment 422473 [details]
&gt; Patch
&gt; 
&gt; Can we test this somehow? Perhaps via some ArgumentCoder API/Unit tests?

I got started trying to make this work in Bug 222957. Maybe you could take a look (well, once I get the tvOS/watchOS stuff fixed).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1737670</commentid>
    <comment_count>9</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2021-03-09 11:06:03 -0800</bug_when>
    <thetext>(In reply to Darin Adler from comment #5)
&gt; (In reply to Brent Fulgham from comment #3)
&gt; &gt; &gt; Can we test this somehow? Perhaps via some ArgumentCoder API/Unit tests?
&gt; &gt; 
&gt; &gt; We could, if such infrastructure existed. It doesn&apos;t appear to.
&gt; &gt; 
&gt; &gt; We would have caught this if there were tests for Apple Pay
&gt; &gt; PaymentSetupConfiguration, but there don&apos;t appear to be any. It might
&gt; &gt; require special server stuff to do so.
&gt; 
&gt; I feel like we need to add this testing. It’s not optional. Every test we
&gt; wrote was hard at first, time to make this testable.

I wrote a small test that exercises the specific Apple Pay thing that broke. I&apos;m going to work with Andy/Alex to get something more full-featured in place. See Bug 222957.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>422473</attachid>
            <date>2021-03-05 21:36:48 -0800</date>
            <delta_ts>2021-03-08 14:39:23 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-222856-20210305213647.patch</filename>
            <type>text/plain</type>
            <size>1906</size>
            <attacher name="Brent Fulgham">bfulgham</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjc0MDIxCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0L0No
YW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCmluZGV4IGM4NGE1NGI0M2MxODQ4OGMw
Njc2MzkzMTdmYmU1ODMwYmE3YjhiYjcuLjNmMWI0ZGE4MjhjY2IyNGUzZmJmYTVkNWQ5ODdkNWQ1
ODU5NGZkOWUgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCisrKyBiL1NvdXJj
ZS9XZWJLaXQvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMjIgQEAKKzIwMjEtMDMtMDUgIEJyZW50IEZ1
bGdoYW0gIDxiZnVsZ2hhbUBhcHBsZS5jb20+CisKKyAgICAgICAgUkVHUkVTU0lPTiAocjI3MzU0
MSk6IFBheWxvYWRzIHJlcXVpcmluZyBOU1VSTCBpbiBzZXJpYWxpemF0aW9uIGZhaWwgCisgICAg
ICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0yMjI4NTYKKyAg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