Visitar URL original
fix: crash in webRequest proxy for redirected CORS preflights and frameless factories by trop[bot] · Pull Request #53304 · electron/electron · GitHub
Skip to content

fix: crash in webRequest proxy for redirected CORS preflights and frameless factories - #53304

Merged
MarshallOfSound merged 1 commit into
43-x-yfrom
trop/43-x-y-bp-fix-crash-in-webrequest-proxy-for-redirected-cors-preflights-and-frameless-factories-1787982667417
Aug 30, 2026
Merged

MarshallOfSound merged 1 commit into
43-x-yfrom
trop/43-x-y-bp-fix-crash-in-webrequest-proxy-for-redirected-cors-preflights-and-frameless-factories-1787982667417

Conversation

@trop

@trop trop Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Backport of #53294

See that PR for details.

Notes: Fixed crashes in the main process when a webRequest.onBeforeRequest listener redirected a CORS preflight request, and when calling net.fetch() with a webRequest-permission extension loaded.

…meless factories

- Returning a redirectURL from onBeforeRequest for a CORS preflight request
  tried to forward the redirect to a URLLoaderClient that preflight requests
  never have. Fail the preflight instead, as the equivalent upstream code
  does.
- URL loader factories created for main-process requests (net.fetch etc.)
  have no RenderFrameHost but were handed to the extensions WebRequest API
  as navigation factories when an extension with the webRequest permission
  was loaded and no session.webRequest listeners were registered, which
  dereferenced the null frame. Keep those factories on Electron's own proxy.

Co-authored-by: Sam Attard <sattard@anthropic.com>
@trop trop Bot added 43-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Aug 29, 2026
@MarshallOfSound
MarshallOfSound enabled auto-merge (squash) August 29, 2026 05:52
@MarshallOfSound
MarshallOfSound merged commit f835161 into 43-x-y Aug 30, 2026
89 of 91 checks passed
@MarshallOfSound
MarshallOfSound deleted the trop/43-x-y-bp-fix-crash-in-webrequest-proxy-for-redirected-cors-preflights-and-frameless-factories-1787982667417 branch August 30, 2026 09:14
@release-clerk

release-clerk Bot commented Aug 30, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed crashes in the main process when a webRequest.onBeforeRequest listener redirected a CORS preflight request, and when calling net.fetch() with a webRequest-permission extension loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

43-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant