You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(library): reject encoded control characters in station routes - #467
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.
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.
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing
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
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.
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,%09and%7Fwere 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.mjsfor four encoded control characters plus valid slug. A standalone reproduction of the originalstationIdentityaccepted%00; focused test of the modified function passed 6/6 assertions on Node 22.16.0. Full repositorynpm 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.