<?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>202753</bug_id>
          
          <creation_ts>2019-10-09 09:32:13 -0700</creation_ts>
          <short_desc>[Cocoa] IPC::decode should gracefully handle a nil allowed class</short_desc>
          <delta_ts>2019-10-09 14:30:16 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</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="Andy Estes">aestes</reporter>
          <assigned_to name="Andy Estes">aestes</assigned_to>
          <cc>cdumez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>ggaren</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1578262</commentid>
    <comment_count>0</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2019-10-09 09:32:13 -0700</bug_when>
    <thetext>[Cocoa] IPC::decode should gracefully handle a nil allowed class</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1578264</commentid>
    <comment_count>1</comment_count>
      <attachid>380537</attachid>
    <who name="Andy Estes">aestes</who>
    <bug_when>2019-10-09 09:42:45 -0700</bug_when>
    <thetext>Created attachment 380537
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1578275</commentid>
    <comment_count>2</comment_count>
      <attachid>380537</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2019-10-09 10:01:14 -0700</bug_when>
    <thetext>Comment on attachment 380537
Patch

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

r=me

&gt; Source/WebKit/ChangeLog:20
&gt; +        rdar://problem/55839467 was resolved by fixing the build misconfiguration, but this patch
&gt; +        improves IPC::decode so that a nil allowed class results in a message decoding failure
&gt; +        rather than a maybe-caught NSException.
&gt; +

What do message decoding failures do at runtime? Would this error we experienced still be obvious, or would it become more subtle?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1578285</commentid>
    <comment_count>3</comment_count>
      <attachid>380537</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2019-10-09 10:24:13 -0700</bug_when>
    <thetext>Comment on attachment 380537
Patch

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

&gt;&gt; Source/WebKit/ChangeLog:20
&gt;&gt; +
&gt; 
&gt; What do message decoding failures do at runtime? Would this error we experienced still be obvious, or would it become more subtle?

When the allowedClasses array is empty, we assert in debug builds and always return nil for the decoded object. So it would depend on the caller to handle that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1578304</commentid>
    <comment_count>4</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2019-10-09 11:10:13 -0700</bug_when>
    <thetext>(In reply to Geoffrey Garen from comment #2)
&gt; Comment on attachment 380537 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=380537&amp;action=review
&gt; 
&gt; r=me
&gt; 
&gt; &gt; Source/WebKit/ChangeLog:20
&gt; &gt; +        rdar://problem/55839467 was resolved by fixing the build misconfiguration, but this patch
&gt; &gt; +        improves IPC::decode so that a nil allowed class results in a message decoding failure
&gt; &gt; +        rather than a maybe-caught NSException.
&gt; &gt; +
&gt; 
&gt; What do message decoding failures do at runtime? Would this error we
&gt; experienced still be obvious, or would it become more subtle?

The new failure mode is that a call to sendSync() with an infinite timeout now returns false when decoding fails in the remote process (rather than hanging).

For cases like rdar://problem/55839467, returning false causes PaymentCoordinator to throw a JavaScript exception telling the webpage that the payment UI could not be presented. We also have a LOG_ERROR (but not a RELEASE_LOG_ERROR) for when secure coding-style decoding fails.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1578308</commentid>
    <comment_count>5</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2019-10-09 11:29:10 -0700</bug_when>
    <thetext>(In reply to Andy Estes from comment #4)
&gt; returning false causes
&gt; PaymentCoordinator to throw a JavaScript exception telling the webpage that
&gt; the payment UI could not be presented. We also have a LOG_ERROR (but not a
&gt; RELEASE_LOG_ERROR) for when secure coding-style decoding fails.

... which I think is at least as obvious a symptom as a hang, in that the Apple Pay UI does not appear in response to button activation in either case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1578387</commentid>
    <comment_count>6</comment_count>
      <attachid>380537</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-10-09 14:29:26 -0700</bug_when>
    <thetext>Comment on attachment 380537
Patch

Clearing flags on attachment: 380537

Committed r250934: &lt;https://trac.webkit.org/changeset/250934&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1578388</commentid>
    <comment_count>7</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-10-09 14:29:28 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1578390</commentid>
    <comment_count>8</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-10-09 14:30:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/56130523&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>380537</attachid>
            <date>2019-10-09 09:42:45 -0700</date>
            <delta_ts>2019-10-09 14:29:26 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-202753-20191009094245.patch</filename>
            <type>text/plain</type>
            <size>2203</size>
            <attacher name="Andy Estes">aestes</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjUwOTEyCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0L0No
YW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCmluZGV4IGIyOGZjYjZiYjA5MTYzZDU0
MzM0YTMyNGU2NTcxYWY1YjBjOTk1YTkuLmE2NmY0ZjE4NjhjNWVlN2YzODQxNDYzOGNjMjY3Zjk3
NTM1Njk4NTkgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCisrKyBiL1NvdXJj
ZS9XZWJLaXQvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMjYgQEAKKzIwMTktMTAtMDkgIEFuZHkgRXN0
ZXMgIDxhZXN0ZXNAYXBwbGUuY29tPgorCisgICAgICAgIFtDb2NvYV0gSVBDOjpkZWNvZGUgc2hv
dWxkIGdyYWNlZnVsbHkgaGFuZGxlIGEgbmlsIGFsbG93ZWQgY2xhc3MKKyAgICAgICAgaHR0cHM6
Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTIwMjc1MworCisgICAgICAgIFJldmll
d2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIElmIElQQzo6ZGVjb2RlIGlzIGNhbGxl
ZCB3aXRoIGEgbmlsIGFsbG93ZWQgY2xhc3MsIGFuIE5TSW52YWxpZEFyZ3VtZW50RXhjZXB0aW9u
IHdpbGwgYmUKKyAgICAgICAgdGhyb3duIHdoZW4gdHJ5aW5nIHRvIGNyZWF0ZSBhbiBOU0FycmF5
IGxpdGVyYWwgd2l0aCBhIG5pbCB2YWx1ZS4gRGVwZW5kaW5nIG9u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