Skip to content

frontend: Shared warning with an "Accept anyway" countdown for fallbacks that lower security #2218

Closed

Description

@vpacher

Summary

Some features fall back to a less safe mode when the safe one cannot work, so that users do not lose them. The maintainer decided on #1092 (#1092 (comment)) how OBS tells the user, and that this is the policy for similar cases:

  • Warn the user, with a 3-second progress countdown that auto-accepts "Accept anyway".
  • Log the error to stderr.
  • Tell the user that this may become a hard error in the future.
  • Use standard terminology, and reword similar existing warnings to match.

Two features need this now:

One shared implementation keeps the dialog, the wording, the log line and the no-UI behaviour the same for both and for later cases.

Proposal

  1. A frontend helper, callable from the frontend and from plugins through the frontend API. It takes a short title, the message (what failed, what OBS does instead, and what the user can do about it), and an ID for the log.
    • It logs the message at error level, so it is in the log and on stderr once (Linux and macOS echo error lines to stderr).
    • With a main window: a warning dialog with a progress bar that counts down 3 seconds, an Accept anyway button, and a Cancel button when the caller can stop (for example a stream start). At the end of the countdown, or on Accept anyway, the caller continues in the fallback mode. Cancel lets the caller stop. The text includes one standard sentence: "This may become an error in a future version of OBS."
    • Without a main window (obs-websocket StartStream, --startstreaming, a headless start): no dialog. It logs, and the caller continues as with Accept anyway.
    • One dialog at a time. The same ID shows only once per session.
  2. A short policy doc (docs/): when a fallback uses the helper, the standard wording (for example "without the sandbox", "unencrypted", "Accept anyway"), and that new cases use it instead of their own dialogs.
  3. Callers: obs-browser (sandbox fallback, bug: browser: CEF 7871 (Chromium 150.0.7871.252, end of life, two in-the-wild V8 CVEs) runs with no_sandbox on every platform #1092) in a follow-up PR. rtmp-services: Prefer RTMPS for services that support it, with fallback to RTMP #2205 can use the helper for the RTMPS fallback.

Not in scope

Testing

  • RED/GREEN unit tests for the helper's decision logic: countdown end → accept, Accept anyway → accept, Cancel → cancel, no main window → accept without a dialog, the same ID twice → one dialog, the log line at error level.
  • One real run on Linux with the browser sandbox fallback (OBS as root), with the dialog, the countdown and the stderr line.

Activity

  1. vpacher commented on Oct 24, 2026

    @vpacher
    MemberAuthor

    Claiming: #2218

    Plan: RED tests for the decision logic, then the helper and the frontend API function, then the policy doc. The obs-browser caller (#1092) follows in its own PR.

  2. added
    claimedAn agent or person has claimed this; check the claim comment before starting
    on Oct 24, 2026
  3. vpacher commented on Oct 24, 2026

    @vpacher
    MemberAuthor

    Decision needed: how does the frontend link the Rust core of this helper?

    The plan is the #846 pattern: the pure logic (dialog or accept at once, once per session, how each dialog end resolves, countdown progress, the log line with the standard sentence) in a new crate rust/obs-fallback-warning with #[test]s on its safe API, and only the Qt dialog and obs_frontend_warn_fallback() in C++.

    The frontend has one Rust staticlib today, obs-gpu-status-frontend, and it builds only with ENABLE_GPU_STATUS (the Flatpak sets it OFF). This warning is a security policy, so it must be in every build, and a second staticlib in the same binary would duplicate the Rust std symbols.

    Proposal: rename obs-gpu-status-frontend to one general frontend staticlib (for example obs-frontend-rust), built whenever the frontend is built, that re-exports both obs-gpu-status and obs-fallback-warning. ENABLE_GPU_STATUS then only switches the GPU light on or off. Cargo becomes a requirement of the frontend; the default OBS_LIBOBS_BACKEND=HYBRID needs it already, so only the OBS_LIBOBS_BACKEND=C rollback build changes. For that build, a small C++ fallback that logs and accepts.

    Alternative: write the core in C (as frontend/utility/encoder-fallback.c.h) and port it later.

    I am writing the Rust crate and its tests now; only the linking waits for the answer.

  4. zackees commented on Oct 24, 2026

    @zackees
    Member

    Decided: the proposal. One general frontend Rust staticlib, built whenever the frontend is built, that re-exports obs-gpu-status and obs-fallback-warning. ENABLE_GPU_STATUS then only switches the GPU light.

    • Two staticlibs in one binary duplicate the Rust std symbols, so one aggregator is the only shape that scales. Later frontend crates join it too.
    • The default HYBRID build already needs Cargo, so the only new requirement is for the OBS_LIBOBS_BACKEND=C rollback build. A C++ fallback there that logs and accepts is fine.
    • Pick the crate name per docs/rust-port/naming.md (ci/test_naming.py checks it). Keep the rename in its own commit, so the GPU-status behaviour is visibly unchanged (Flatpak still OFF for the light).
    • Writing the core in C first would only mean porting it again.

    (Coordinator decision.)

  5. github-actions commented on Oct 24, 2026

    @github-actions

    Claim bot: @vpacher, the decision is in; your claim is no longer blocked.

    Decided: the proposal. One general frontend Rust staticlib, built whenever the frontend is built, that re-exports obs-gpu-status and obs-fallback-warning. ENABLE_GPU_STATUS then only switches the GPU light.

    • Two staticlibs in one binary duplicate the Rust std symbols, so one aggregator is the only shape that scales. Later frontend crates join it too.
    • The default HYBRID build already needs Cargo, so the only new requirement is for the OBS_LIBOBS_BACKEND=C rollback build. A C++ fallback there that logs and accepts is fine.
    • Pick the crate name per docs/rust-port/naming.md (ci/test_naming.py checks it). Keep the rename in its own commit, so the GPU-status behaviour is visibly unchanged (Flatpak still OFF for the light).
    • Writing the core in C first would only mean porting it again.

    (Coordinator decision.)

  6. 14 remaining items

  7. moved this from In progress to Done in obs-rust Multiviewon Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

readyMeets the definition of Ready; claimable

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions