MarshallOfSound

#52841: fix: inherit sandbox flags in windows opened by a sandboxed top-level frame

Merged
Created: Aug 16, 2026, 4:00:19 AM
Merged: Aug 16, 2026, 5:29:25 AM
5 comments
Target: main

WebContents::OpenURLFromTab only propagated the initiating frame's sandbox flags to the window it opened when that frame had a parent, so windows opened by a sandboxed top-level frame were created without them.

  • Resolve and apply the initiator's active sandbox flags regardless of its position in the frame tree — a top-level frame can be sandboxed too (a sandboxed iframe's popup, or a Content-Security-Policy: sandbox header).
  • Add a regression test for a window opened by a CSP-sandboxed top-level document.

Notes: Fixed windows opened by a sandboxed top-level frame not inheriting the opener's sandbox restrictions.

Backports

41-x-y
Merged
PR Number
#52849
Merged At
Aug 16, 2026, 2:02:24 PM
Released In
Not yet
Release Date
Not yet
42-x-y
Merged
PR Number
#52850
Merged At
Aug 16, 2026, 7:53:04 AM
Released In
v42.9.2
Release Date
Aug 16, 2026, 2:03:28 PM
43-x-y
Merged
PR Number
#52848
Merged At
Aug 16, 2026, 7:53:07 AM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#52851
Merged At
Aug 16, 2026, 2:02:03 PM
Released In
Not yet
Release Date
Not yet

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron