Repository navigation
rtsp: do not send a learned session id to another origin - #22920
Closed
MegaManSec wants to merge 1 commit into
Closed
MegaManSec wants to merge 1 commit into
MegaManSec wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Redirect setup resets the new provenance state, so the cross-origin Session header leak remains.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds origin tracking intended to prevent learned RTSP session IDs from leaking across cross-origin redirects.
Changes:
- Records and cleans up the session issuer’s origin.
- Suppresses learned session IDs for mismatched origins unless unrestricted authentication is enabled.
File summaries
| File | Description |
|---|---|
lib/rtsp.c |
Adds RTSP session-origin tracking and forwarding checks. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
A Session: id issued by one server was forwarded across a redirect to the next origin. Remember the origin that issued it and suppress the header elsewhere, unless CURLOPT_UNRESTRICTED_AUTH is set. An id set with CURLOPT_RTSP_SESSION_ID is unaffected.
MegaManSec
force-pushed
the
rtsp-session-origin-check
branch
from
September 14, 2026 09:02
da4cca3 to
dddac03
Compare
MegaManSec
force-pushed
the
rtsp-session-origin-check
branch
from
September 14, 2026 09:22
dddac03 to
d469547
Compare
bagder
approved these changes
Sep 17, 2026
Member
|
Thanks! |
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.
A server-issued RTSP
Session:id was forwarded across a redirect to the next origin, in the same request whereAuthorization:is correctly stripped.Curl_rtsp_parseheader()records the issuing origin indata->state.rtsp_session_origin, which survives redirects — the per-connectionstruct RTSPdoes not, asrtsp_setup_connection()installs a fresh one on every connection setup.rtsp_do()then suppressesSession:when the current origin differs.CURLOPT_UNRESTRICTED_AUTHis the opt-in, consistent with credentials. An id set withCURLOPT_RTSP_SESSION_IDis never flagged as learned and is forwarded unconditionally.RFC 2326 §12.37 scopes a session identifier to one server. The
CURLOPT_REDIR_PROTOCOLS_STRdefault already blocks RTSP redirects out of the box; this covers callers that enable them.Test 3230 covers it.