fix(security): close publish/play auth bypass for SO and releaseStream callbacks - #248
Merged
AlexanderWagnerDev merged 1 commit intoSep 3, 2026
Merged
Conversation
…is configured Extend the publish/play cross-gate to treat on_shared_object_auth_cb and on_release_stream_cb like on_media_cb/on_frame_cb: integrators that wire only those hooks must also set on_publish_cb/on_play_cb or peers can publish/play through the built-in relay without authorization. Co-authored-by: Alexander Wagner <info@alexanderwagnerdev.com>
Contributor
|
@codex review |
AlexanderWagnerDev
marked this pull request as ready for review
September 3, 2026 12:19
Contributor
Author
Bugbot couldn't run - usage limit reachedBugbot 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_bf0e6230-9ec1-4819-a6a7-3f8fbd0716f7) |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
AlexanderWagnerDev
deleted the
security/fix-publish-play-auth-cross-gate
branch
September 3, 2026 13:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes two medium-severity authorization bypasses in the built-in server relay where
publish/playsucceeded withouton_publish_cb/on_play_cbwhen only specialized callbacks were configured.Findings
1. Publish/play bypass with only
on_shared_object_auth_cb(Medium)src/session/conn.rson_shared_object_auth_cbis set.2. Publish/play bypass with only
on_release_stream_cb(Medium)src/session/conn.rson_release_stream_cbis set.Changes
requires_explicit_publish_auth()/requires_explicit_play_auth()helpers mirroring the existingon_media_cb/on_frame_cbcross-gate pattern.publish/playwhen onlyon_shared_object_auth_cboron_release_stream_cbis configured.Closes #246, closes #247.
Note
High Risk
Changes RTMP publish/play authorization in the session layer; incorrect gating could block legitimate integrators or leave relay bypasses open.
Overview
Closes authorization gaps where peers could publish or play through the built-in relay when integrators only wired
on_shared_object_auth_cboron_release_stream_cb, withouton_publish_cb/on_play_cb.Adds
requires_explicit_publish_auth()andrequires_explicit_play_auth()inconn.rs, extending the existing cross-gate (media/frame callbacks) to treat shared-object auth and release-stream hooks as signals that publish/play must be explicitly authorized.publishandplaycommand handling now reject with the same “not authorized” onStatus errors when the matching callback is missing but any of those hooks is set.Regression tests cover publish/play rejection for shared-object-auth-only and release-stream-only configurations, including relay staying disabled and a sanity check that shared-object delivery still respects auth when configured.
Reviewed by Cursor Bugbot for commit 37a80a0. Bugbot is set up for automated code reviews on this repo. Configure here.