Skip to content

Only enable CEF remote debugging when OBS_BROWSER_REMOTE_DEBUGGING_PORT is set - #58

Closed
nbarrett-logitech wants to merge 1 commit into
streamlabsfrom
gate-remote-debugging-port
Closed

nbarrett-logitech wants to merge 1 commit into
streamlabsfrom
gate-remote-debugging-port

Conversation

@nbarrett-logitech

Copy link
Copy Markdown

Summary

BrowserApp::OnBeforeCommandLineProcessing always appended remote-debugging-port=9222 and remote-allow-origins=http://localhost:9222 (added in #44). While any browser source is running, that leaves an unauthenticated DevTools endpoint on 127.0.0.1:9222. Any other local process or account can list the pages and evaluate script in them, which exposes widget URLs, cookies and localStorage.

Both switches are now only added when OBS_BROWSER_REMOTE_DEBUGGING_PORT is set to a valid port (1-65535). The allowed origin uses the same port. With the variable unset, empty or invalid, nothing is opened, so release builds no longer listen.

The panel's right-click "Inspect" item uses ShowDevTools in-process and is not affected.

Notes

  • Anyone who debugs browser sources through localhost:9222 now needs to launch with OBS_BROWSER_REMOTE_DEBUGGING_PORT=9222.
  • @summeroff, do you still use the port? If not, I'm happy to delete the switches outright instead of gating them.

Testing

Not built locally (needs the libobs and CEF toolchain), relying on CI. To verify by hand: launch with the variable unset and confirm nothing listens on 9222, then set it to 9222 and confirm http://127.0.0.1:9222/json/list responds.

…RT is set

The remote-debugging-port and remote-allow-origins switches were appended unconditionally, so every browser source host exposed an unauthenticated DevTools endpoint on 127.0.0.1:9222 to any local process or account.

Both switches are now added only when OBS_BROWSER_REMOTE_DEBUGGING_PORT holds a valid port number. The same port is used for the allowed origin.
@nbarrett-logitech

Copy link
Copy Markdown
Author

Closing as a duplicate of #57, which makes the same change.

@nbarrett-logitech
nbarrett-logitech deleted the gate-remote-debugging-port branch October 28, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants