<?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>237566</bug_id>
          
          <creation_ts>2022-03-07 16:23:47 -0800</creation_ts>
          <short_desc>Setting `Cross-Origin-Opener-Policy: same-origin` breaks back-forward history navigations</short_desc>
          <delta_ts>2022-06-23 15:50:43 -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>History</component>
          <version>Safari 15</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>235475</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=237137</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Dworken">ddworken</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>ddworken</cc>
    
    <cc>pgriffis</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1849020</commentid>
    <comment_count>0</comment_count>
    <who name="David Dworken">ddworken</who>
    <bug_when>2022-03-07 16:23:47 -0800</bug_when>
    <thetext># Summary 

If a page sets `Cross-Origin-Opener-Policy: same-origin`, Safari hangs while loading the page if the user hits the back button and then the forward button. See this demo: https://coop.xss.guru/coop_bf

# Details 

Webkit&apos;s back-forward cache appears to be broken for pages that set COOP: same-origin. Reproduction steps:

1. User is on a page without a COOP header 
2. User clicks a link to a page that sets COOP same-origin
3. User clicks the back button followed by the forward button 
4. In Safari&apos;s UI, the page appears to hang while loading. Safari devtools show no pending request or errors in the console. Using an intercepting proxy one can see that Safari is making an infinite loop of requests to the page that sets COOP same-origin 
5. If the page is modified to set COOP unsafe-none or if COOP support is disabled in Safari, the back-forward navigation completes successfully 

Demo site: https://coop.xss.guru/coop_bf
Demo video: https://drive.google.com/file/d/1-fqOwhx549GSzrlyFx9fbXK9uepC7J8j/view</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1849023</commentid>
    <comment_count>1</comment_count>
    <who name="David Dworken">ddworken</who>
    <bug_when>2022-03-07 16:30:13 -0800</bug_when>
    <thetext>I just spotted https://bugs.webkit.org/show_bug.cgi?id=237137 which appears to be about the same behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1850160</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-03-10 10:19:07 -0800</bug_when>
    <thetext>&lt;rdar://problem/90106601&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1877950</commentid>
    <comment_count>3</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-06-23 15:50:43 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 235475 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>