Allow WebSocket requests over the network #538
Labels
No labels
area/accessibility
area/dependency
Confirmed
Crash Report
Delayed
Design Issue
Duplicate
Feedback required
Good first issue
kind/bug
kind/cleanup
kind/enhancement
platform/linux
platform/macos
platform/windows
priority/high
Question
Request for Comments
Seeking Other Contributors
Seeking Testers
Won't Fix / By Design
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-obsproject/obs-browser!538
Loading…
Reference in a new issue
No description provided.
Delete branch "allow-websocket"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Well this solution ended up being different than I expected.
I had previously prepared
github.com/WizardCM/obs-browser@4c65eaaf40which would show a permission request dialog.However, in my testing today, this dialog does not get triggered for a website attempting to access the local network for WebSockets, at least on CEF 150. Neither
OnRequestMediaAccessPermissionnorOnShowPermissionPromptget called.This is strange, because on a shipping version of Google Chrome, a permission dialog is displayed, and clicking Allow enables the connection. Further digging is required but is not a blocker for this PR.
The flow in CEF works like so
OnRequestMediaAccessPermissionOnShowPermissionPromptgithub.com/chromium/chromium@8408977/services/network/public/cpp/features.cc (L273-L279)Webcam and Microphone seem to continue to work via
--enable-media-streamper this documentation, which I have verified is true. This behaviour is unchanged before or after this PR.Motivation and Context
Retain pre-Chrome-runtime behaviour for all permissions (for now). In this case, the ability for a browser source or dock's webpage to make outgoing WebSocket requests.
Fixes
ERR_BLOCKED_BY_LOCAL_NETWORK_ACCESS_CHECKSWe do not want to provide regressions while a better solution is devised.
At the same time, we also don't want to open too many security holes by using broad toggles.
How Has This Been Tested?
Launch with CEF 150 on Windows pointed to
https://obs.wesbos.com/Attempt to log in.
Types of changes
Checklist:
Have not explicitly tested the change, but the behaviour is desired for now per the PR description.