fix(ci): apply rustfmt to rtmp_bridge disabled-stream test - #123
Conversation
Operational publish/play rejections after a successful key lookup (disabled stream, pending delete, publisher slot taken, play connection cap) no longer bypass the per-IP auth-failure budget. This closes a side channel that let remote peers distinguish valid keys from guesses by observing whether their attempt consumed rate-limit quota. Co-authored-by: Alexander Wagner <info@alexanderwagnerdev.com>
Co-authored-by: Alexander Wagner <info@alexanderwagnerdev.com>
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
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_b39693ee-04ee-421f-b9ab-91b65f81741b) |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8af9bc20fc
ℹ️ 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".
Fixes CI failure on PR #122 where
cargo fmt --checkrejected multi-line formatting in thepublish_rejects_disabled_stream_with_valid_keytest assertion insrc/rtmp_bridge.rs.Applies
cargo fmtto collapse theauthorize_publishcall onto a single line.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Changes RTMP authentication rate-limiting behavior, which affects brute-force resistance and may throttle legitimate clients retrying with valid keys on disabled or full streams.
Overview
RTMP publish/play auth now treats rejections for valid keys that still cannot connect (disabled stream, pending delete, duplicate publisher, play connection cap) as
RecognizedKey, and those failures use the same per-IP auth-failure budget as bad credentials.Operationalis only for internal errors (e.g. keygen/DB) that do not reveal whether a key exists.authorize_publish/authorize_playcallconsumes_auth_budget()instead of checking onlyCredential, closing an oracle where attackers could tell valid keys apart from invalid ones by whether attempts were rate-limited.Tests are updated: disabled-stream valid-key probes must hit the limit after
RTMP_AUTH_MAX_FAILURESattempts, including when mixed with bogus keys.clapis bumped inCargo.lock(4.6.4 → 4.6.5).Reviewed by Cursor Bugbot for commit 8af9bc2. Bugbot is set up for automated code reviews on this repo. Configure here.