Skip to content

Gate CEF remote debugging behind an env var - #57

Merged
summeroff merged 1 commit into
streamlabsfrom
browser-debug-port-env
Oct 28, 2026
Merged

summeroff merged 1 commit into
streamlabsfrom
browser-debug-port-env

Conversation

@summeroff

@summeroff summeroff commented Oct 23, 2026 •

Copy link
Copy Markdown

Every shipped build opened the CEF DevTools port 9222 (a leftover from debugging browser-source messaging in #44), so any local process could attach to browser sources and their logged-in pages.

  • Remote debugging is now enabled only when OBS_BROWSER_REMOTE_DEBUGGING_PORT is set in the environment. Desktop/osn pass their environment to obs64, so set it before launching Desktop.
  • Removed per-message [BrowserMessage] logs, which wrote message payloads into the OBS log.
  • Collapsed the no-op ControlLevel switch in the non-frontend-API branch. Messaging was already allowed at every level, so behaviour is unchanged.
  • clang-format fixes in obs-browser-source.cpp; the format check covers whole changed files.

Tests

  • cmake --build build_x64 --config RelWithDebInfo --target obs-browser obs-browser-helper: OK (warnings as errors)
  • ctest -R obs-browser: 1/1 passed

The DevTools port 9222 was opened unconditionally in every shipped build,
letting any local process attach to browser sources. It is now enabled only
when OBS_BROWSER_REMOTE_DEBUGGING_PORT is set. Also drops per-message logging
and the no-op ControlLevel switch around browser messaging.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the changes making remote debugging opt-in and removing browser-message payload logging.

No open issues 🎉

What changed in this PR

This PR makes CEF remote debugging opt-in and removes browser-message logging that could expose message payloads in OBS logs.

Changes:

  • Replaces the hard-coded DevTools port with OBS_BROWSER_REMOTE_DEBUGGING_PORT, applied only to the browser process.
  • Removes per-message logs and simplifies the non-frontend-API message handler while preserving behavior.
  • Applies formatting fixes in obs-browser-source.cpp.
File Description
obs-browser-source.cpp Removes outgoing message payload logging and fixes formatting.
browser-client.cpp Removes incoming message logs and simplifies the control-level dispatch.
browser-app.cpp Enables remote debugging when the environment variable is nonempty and derives the allowed origin from its value.

Review effort: Balanced

@summeroff
summeroff merged commit 8edc347 into streamlabs Oct 28, 2026
2 checks passed
summeroff added a commit to streamlabs/obs-studio that referenced this pull request Oct 28, 2026
* Bump obs-browser to gate remote debugging behind an env var

Picks up streamlabs/obs-browser#57: the DevTools port is no longer opened in
shipped builds unless OBS_BROWSER_REMOTE_DEBUGGING_PORT is set.

* Update obs-browser to streamlabs branch head
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.

3 participants