<?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>271377</bug_id>
          
          <creation_ts>2024-03-21 05:34:37 -0700</creation_ts>
          <short_desc>Frame-Ancestors directive not supported in Content-Security-Policy-Report-Only Mode</short_desc>
          <delta_ts>2024-03-28 02:35:53 -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>Frames</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=251889</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=247626</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=207563</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar, WPTImpact</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>jannis.rautenstrauch</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>karlcow</cc>
    
    <cc>mike</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wilander</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2022713</commentid>
    <comment_count>0</comment_count>
    <who name="">jannis.rautenstrauch</who>
    <bug_when>2024-03-21 05:34:37 -0700</bug_when>
    <thetext>Framing a page that sets a `Content-Security-Policy-Report-Only: frame-ancestors &apos;none&apos;` header results in the following error message: &quot;The Content Security Policy directive &apos;frame-ancestors&apos; is ignored when delivered in a report-only policy.&quot; in Safari only. In Chromium and Firefox, a report is generated.

The following two WPT tests already test for this behavior and it would be great for compatibility if WebKit also would report the violation here.
- https://wpt.fyi/results/content-security-policy/frame-ancestors/report-only-frame.sub.html?label=master&amp;label=experimental&amp;aligned&amp;q=frame-ancestors
- https://wpt.fyi/results/content-security-policy/reporting/report-frame-ancestors-with-x-frame-options.sub.html?label=master&amp;label=experimental&amp;aligned&amp;q=frame-ancestors</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2023000</commentid>
    <comment_count>1</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-03-21 20:12:12 -0700</bug_when>
    <thetext>The first test
http://wpt.live/content-security-policy/frame-ancestors/report-only-frame.sub.html
fails with (No asserts ran)
   undefined is not an object (evaluating &apos;data[0][&quot;body&quot;]&apos;)
only in Safari

The second test fails
http://wpt.live/content-security-policy/reporting/report-frame-ancestors-with-x-frame-options.sub.html
fails with (No asserts ran) 
Safari:  undefined is not an object (evaluating &apos;data[0][&quot;body&quot;]&apos;)
Firefox: can&apos;t access property &quot;body&quot;, data[0] is undefined</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2023001</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-03-21 20:12:28 -0700</bug_when>
    <thetext>&lt;rdar://problem/125210248&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2023056</commentid>
    <comment_count>3</comment_count>
    <who name="">jannis.rautenstrauch</who>
    <bug_when>2024-03-22 00:41:12 -0700</bug_when>
    <thetext>The second test failing in Firefox is not due to the feature the test wants to test but due to the fact that a download is triggered in Firefox only: https://github.com/web-platform-tests/wpt/issues/45249</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>