<?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>281175</bug_id>
          
          <creation_ts>2024-10-09 16:41:07 -0700</creation_ts>
          <short_desc>Using Cross-Origin-Opener-Policy HTTP header may corrupt the back/forward list</short_desc>
          <delta_ts>2024-11-11 11:51:09 -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>WebKit2</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=274310</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="Chris Dumez">cdumez</reporter>
          <assigned_to name="Chris Dumez">cdumez</assigned_to>
          <cc>jarek</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>pmusaraj</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2066696</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2024-10-09 16:41:07 -0700</bug_when>
    <thetext>Using Cross-Origin-Opener-Policy HTTP header may corrupt the back/forward list:
```
Got a better repro (thanks to a colleague, David Taylor). 

https://d5.musaraj.com and https://d6.musaraj.com are identical, but d5 has the COOP header, d6 doesn&apos;t. The HTML for both is: 

```
&lt;ol&gt;
&lt;li&gt;&lt;button onclick=&quot;window.history.pushState({}, null, &apos;/foo&apos;)&quot;&gt;Click me&lt;/button&gt;&lt;/li&gt;
&lt;li&gt;Use browser to go &apos;back&apos; one step&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://d4.musaraj.com&quot;&gt;Then click me&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
```

https://d4.musaraj.com has this HTML: 

```
&lt;script&gt;document.write(`window.location is ${window.location}`)&lt;/script&gt;
```

Can see that window history gets corrupted with steps followed in d5 but not with d6.
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2066697</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-10-09 16:41:29 -0700</bug_when>
    <thetext>&lt;rdar://problem/137635838&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2066699</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2024-10-09 16:42:44 -0700</bug_when>
    <thetext>This is a follow-up to Bug 274310 as it still appears to be broken.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2069971</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2024-10-22 20:11:45 -0700</bug_when>
    <thetext>I have a fix (actually 2 ways one more complete but a bit more risky and another very limited but safe). I&apos;m working on a test now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2070242</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2024-10-23 17:04:52 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/35657</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2070744</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-10-26 13:46:02 -0700</bug_when>
    <thetext>Committed 285729@main (2b008f6776a2): &lt;https://commits.webkit.org/285729@main&gt;

Reviewed commits have been landed. Closing PR #35657 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2073569</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-11-07 12:03:45 -0800</bug_when>
    <thetext>Committed 283286.449@safari-7620-branch (1b35def6ef77): &lt;https://commits.webkit.org/283286.449@safari-7620-branch&gt;

Reviewed commits have been landed. Closing PR #2240 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2074329</commentid>
    <comment_count>7</comment_count>
    <who name="Penar Musaraj">pmusaraj</who>
    <bug_when>2024-11-11 11:51:09 -0800</bug_when>
    <thetext>I can still repro this issue on latest Safari TP, release 207. 

I cannot reproduce it on an early archive build, 285848@main from October 29.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>