Skip to content

fix(library): reject encoded control characters in station routes - #467

Merged
hoangsvit merged 3 commits into
stagingfrom
fix/reject-control-characters-station-path-20261110
Nov 10, 2026
Merged

hoangsvit merged 3 commits into
stagingfrom
fix/reject-control-characters-station-path-20261110

Conversation

@hoangsvit

Copy link
Copy Markdown
Member

Bug and reproduction

stationIdentity({url:'/asia/viet-nam/radio%00test', title:'test'}) previously returned a valid station despite the decoded URL containing a NUL control character. %0A, %09 and %7F were similarly accepted. This allows malformed saved/shared station links to pass validation; impact on production playback has not been independently observed.

Fix

Reject decoded C0 control characters and DEL in any station path segment, preserving the existing dot-segment, separator, malformed-escape checks and valid percent-encoded Unicode slugs. This is independent of the open global-radio PR #466.

Tests

Added regression test to tests/listening-library.test.mjs for four encoded control characters plus valid slug. A standalone reproduction of the original stationIdentity accepted %00; focused test of the modified function passed 6/6 assertions on Node 22.16.0. Full repository npm test, CI, build and browser testing have not been run/verified.

Risk / acceptance

Low: previously stored malformed URLs containing encoded controls will be ignored on hydration. Accept when regression tests and CI pass, and valid station links including Unicode remain usable. No merge/deployment.

@coderabbitai

coderabbitai Bot commented Nov 10, 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 10, 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 10, 2026 05:24
@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 3b02133 into staging Nov 10, 2026
6 checks passed
@hoangsvit
hoangsvit deleted the fix/reject-control-characters-station-path-20261110 branch November 10, 2026 05:24

This branch was successfully deployed

1 active deployment
preview — 098fb48c Deployed Nov 10, 2026 by hoangsvit via Remove closed PR Preview #409
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