fix: harden on_media_cb codec auth and FFI tls_insecure handling - #218
Closed
cursor[bot] wants to merge 1 commit into
Closed
fix: harden on_media_cb codec auth and FFI tls_insecure handling#218cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
- Surface non-UTF-8 FourCC and unknown legacy codec nibbles to on_media_cb via stable labels instead of None, and deny frames with no codec identity - Require tls_insecure == 1 (not any non-zero) to disable RTMPS verification Co-authored-by: Alexander Wagner <info@alexanderwagnerdev.com>
AlexanderWagnerDev
added a commit
that referenced
this pull request
Aug 15, 2026
PR #218 added a test using LazyLock without the local import that other conn.rs tests use, causing cargo test and sanitizer jobs to fail at compile time. Co-authored-by: Alexander Wagner <info@alexanderwagnerdev.com>
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.
Security review fixes
This PR addresses two validated findings from the scheduled application-security scan (commit
1fcbe51).1. Unknown codec identity bypasses deny-list
on_media_cbauthorization (Medium) — #216src/session/conn.rsNone(non-UTF-8 FourCC bytes or unknown legacy codec nibbles).fourcc:…,legacy:…) toon_media_cb, deny frames with no codec identity when the callback is registered, and add regression tests.2. Uninitialized
ServerConfig.tls_insecuredisables RTMPS verification (High) — #217src/lib.rs,include/librtmp2/librtmp2.hServerConfigcould silently disable TLS certificate verification forlrtmp2_client_create().tls_insecure == 1exactly (not any non-zero garbage) before enabling insecure mode; document the contract in the public header.Closes #216 and #217.