Skip to content

fix(conn): require publish/play auth when only on_shared_object_cb is set - #321

Merged
AlexanderWagnerDev merged 2 commits into
mainfrom
security/fix-shared-object-cb-auth-bypass
Sep 23, 2026
Merged

AlexanderWagnerDev merged 2 commits into
mainfrom
security/fix-shared-object-cb-auth-bypass

Conversation

@cursor

@cursor cursor Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Security fix (closes #251)

Severity: High — authorization bypass on built-in relay servers

Location: src/session/conn.rs

Impact: A server that registers only on_shared_object_cb (shared-object observer, no on_publish_cb/on_play_cb) implicitly allowed any peer to publish/play, enabling unauthorized ingest/playback and setting relay_enabled.

Root cause: requires_explicit_publish_auth() / requires_explicit_play_auth() omitted on_shared_object_cb, unlike on_shared_object_auth_cb and other non-publish/play hooks.

Fix: Include on_shared_object_cb in both cross-gates; add regression tests mirroring the existing on_shared_object_auth_cb coverage.

Scan note: Re-validated on 253eaf86f1bba7b4c518e14fbbf2a2a799974a0c during the 2026-09-23 scheduled review (already tracked as #251). Accidentally opened #320 as duplicate — closed.

CI: cargo test, cargo clippy --all-features --all-targets.

Open in Web View Automation 

Note

High Risk
Fixes a server-side authorization bypass that allowed unauthorized publish/play and relay on shared-object-observer-only configurations; behavior change for deployments that relied on the old implicit allow.

Overview
Security patch (0.9.1) closes an authorization bypass for RTMP servers that only register on_shared_object_cb for shared-object observation.

requires_explicit_publish_auth() and requires_explicit_play_auth() now treat on_shared_object_cb like other non-publish/play hooks (e.g. on_shared_object_auth_cb, on_media_cb), so publish and play are denied when no on_publish_cb / on_play_cb is configured—relay_enabled stays off instead of implicitly enabling ingest, playback, and relay. Regression tests cover publish and play on shared-object-only setups.

Release metadata: crate version 0.9.0 → 0.9.1, plus matching CHANGELOG and debian/changelog entries.

Reviewed by Cursor Bugbot for commit 89ef0dc. Bugbot is set up for automated code reviews on this repo. Configure here.

Release preparation

  • Bump crate version from 0.9.0 to 0.9.1.
  • Add the security fix to CHANGELOG.md.
  • Add a matching 0.9.1-1 entry to debian/changelog.

… set

Servers that register only the shared-object delivery callback (without
on_publish_cb/on_play_cb) implicitly authorized any peer to publish or
play because requires_explicit_*_auth omitted on_shared_object_cb.

Co-authored-by: Alexander Wagner <info@alexanderwagnerdev.com>
@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 078e76a5-16f9-405e-aa0a-563ac6bb11c1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AlexanderWagnerDev
AlexanderWagnerDev marked this pull request as ready for review September 23, 2026 12:00
@AlexanderWagnerDev

Copy link
Copy Markdown
Contributor

@codex review

@cursor

cursor Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_57503b54-45dd-4393-acce-74918a854739)

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: e16e7ea31e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cursor

cursor Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_e375246d-324b-48a5-92f1-e13bc452ca6d)

@sonarqubecloud

Copy link
Copy Markdown

@AlexanderWagnerDev
AlexanderWagnerDev merged commit da9afe2 into main Sep 23, 2026
62 checks passed
@AlexanderWagnerDev
AlexanderWagnerDev deleted the security/fix-shared-object-cb-auth-bypass branch September 23, 2026 12:21
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.

Publish/play bypass authorization when server configures only on_shared_object_cb

2 participants