[MM-68968] Guard redirects and subframe navigations alongside will-navigate (#3927) - #3928
Merged
Merged
Conversation
Contributor
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
devinbinnie
enabled auto-merge (squash)
July 31, 2026 14:41
Contributor
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/app/views/pluginsPopUps.ts`:
- Line 65: Replace the generateWillFrameNavigate registration in
PluginsPopUpsManager with a popup-specific subframe handler that allows
about:blank, about:srcdoc, and URLs matching the parent window’s originating
server origin, while preventing all other subframe navigations. Update the
corresponding pluginsPopUps test case to assert that a cross-origin HTTPS URL is
blocked.
In `@src/app/views/webContentEvents.ts`:
- Line 259: Update the popup navigation listeners near generateWillFrameNavigate
so the popup’s will-redirect event also uses generateWillFrameNavigate, while
preserving the event.isMainFrame distinction for subframes. Add a regression
test covering an HTTPS subframe redirect to custom://payload and verify the
subframe policy blocks or handles it as expected.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: cf95d1c4-e982-4d03-83de-2b239c303c9c
📒 Files selected for processing (8)
src/app/callsWidgetWindow.test.jssrc/app/callsWidgetWindow.tssrc/app/views/pluginsPopUps.test.jssrc/app/views/pluginsPopUps.tssrc/app/views/webContentEvents.test.jssrc/app/views/webContentEvents.tssrc/app/views/webContentEventsCommon.test.tssrc/app/views/webContentEventsCommon.ts
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of #3927 to
release-6.3Change Impact: 🟡 Medium
Regression Risk: Changes affect shared navigation handling across multiple Electron windows. Automated tests cover main-frame and subframe navigation paths.
QA Recommendation: Skip manual QA because automated coverage is comprehensive and rollback is straightforward.
Generated by CodeRabbitAI