Skip to content

fix(playback): block OAuth-style stream credentials from CORS proxy fallback - #541

Merged
hoangsvit merged 2 commits into
stagingfrom
fix/proxy-sensitive-query-credentials-20261120
Nov 20, 2026
Merged

hoangsvit merged 2 commits into
stagingfrom
fix/proxy-sensitive-query-credentials-20261120

Conversation

@hoangsvit

Copy link
Copy Markdown
Member

Verified issue

buildPlaybackSources suppresses proxy fallback for token and accessKey, but its sensitive query matcher does not recognize common credential keys such as access_token, refresh_token, id_token, auth_token, session_token, session_key, and client_secret. A plain MP3 stream URL with these parameters therefore generates a second candidate that forwards its query string to the configured third-party CORS proxy. This risks disclosure when direct playback fails.

Fix

  • Extend the existing case-insensitive sensitive-key matcher narrowly to these credential families.
  • Add a regression test asserting private URLs stay direct while an ordinary quality=high URL retains its proxy fallback.
  • No change to HLS, proxied catalog entries, retry order or external station data.

Verification

  • Reproduced the old matcher returning false for five OAuth-style credential names on Node 22.16.0.
  • Ran 13 targeted credential/public-key matcher assertions locally: PASS on Node 22.16.0.
  • Full npm test, npm ci, Node 24.15.0, Nuxt build and browser QA not run: GitHub git host is not reachable from execution container; await PR CI.

Acceptance criteria

  • Credential-bearing stream URL never creates an auto-proxied candidate
  • Ordinary unsigned non-HLS stream still has proxy fallback
  • Existing source order, HLS and explicit proxied behavior unchanged
  • CI npm test and build pass

Risk

Low, but some stream endpoints using these credential parameter names may lose automatic CORS fallback. This is intentional to avoid forwarding credentials to a third-party proxy. Review any affected catalog sources before merge. No deployment or release requested.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

ePlus OnAir — PR Preview

🗃️ Preview expired. This PR is closed; the Preview link is hidden.

View build status

Preview is noindex; the full catalog is available on Staging after merge.

@hoangsvit
hoangsvit marked this pull request as ready for review November 20, 2026 17:00
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@hoangsvit
hoangsvit merged commit 40c33f6 into staging Nov 20, 2026
10 checks passed
@hoangsvit
hoangsvit deleted the fix/proxy-sensitive-query-credentials-20261120 branch November 20, 2026 17:01

This branch was previously deployed

1 inactive deployment
preview — ab629bbd Deployed Nov 20, 2026 by hoangsvit via Remove closed PR Preview #553
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.

1 participant