-
Notifications
You must be signed in to change notification settings - Fork 0
[CORRUPTED] Synthetic Benchmark PR #48512 - feat: support WebSocket authentication handling #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: base_pr_48512_20251204_5941
Are you sure you want to change the base?
[CORRUPTED] Synthetic Benchmark PR #48512 - feat: support WebSocket authentication handling #36
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
User description
Benchmark PR electron#48512
Type: Corrupted (contains bugs)
Original PR Title: feat: support WebSocket authentication handling
Original PR Description: #### Description of Change
Refs electron#48505.
This PR adds handling for the 'login' event to allow authentication via web sockets.
Checklist
npm testpassesRelease Notes
Notes: Added support for WebSocket authentication through the
loginevent onwebContents.Original PR URL: electron#48512
PR Type
Bug fix, Enhancement
Description
Add WebSocket authentication handling via login event
Implement OnAuthRequired method with LoginHandler integration
Move AuthRequiredResponse enum from ProxyingWebSocket to WebRequest
Fix critical bug in OnLoginAuthResult causing use-after-free
Add comprehensive test for WebSocket authentication flow
Diagram Walkthrough
File Walkthrough
electron_api_web_request.h
Add WebSocket authentication API definitionsshell/browser/api/electron_api_web_request.h
AuthRequiredResponseenum with four states for auth handlingAuthCallbacktype for async auth result callbacksOnAuthRequiredmethod signature for handling auth challengesOnLoginAuthResultprivate method to bridge LoginHandler callbacksMatchesRequestto accept const pointerlogin_handler.h
Add simplified LoginHandler constructorshell/browser/login_handler.h
login_handler.cc
Implement simplified LoginHandler constructorshell/browser/login_handler.cc
proxying_websocket.cc
Integrate WebRequest auth handling in WebSocketshell/browser/net/proxying_websocket.cc
OnAuthRequiredCompleteto useapi::WebRequest::AuthRequiredResponseweb_request_->OnAuthRequiredAUTH_REQUIRED_RESPONSE_IO_PENDINGstateResumeIncomingMethodCallProcessingcallelectron_api_web_request.cc
Implement WebSocket auth handling with critical bugshell/browser/api/electron_api_web_request.cc
andlogin_handler.hauth_callbackandlogin_handlerfields toBlockedRequeststructOnAuthRequiredmethod creating LoginHandler for authchallenges
OnLoginAuthResultcallback with critical use-after-free bugproxying_websocket.h
Remove local AuthRequiredResponse enumshell/browser/net/proxying_websocket.h
AuthRequiredResponseenum definitionWebRequestclass for centralized auth handlingapi::WebRequest::AuthRequiredResponseapi-web-request-spec.ts
Add WebSocket login event authentication testspec/api-web-request-spec.ts