Repository navigation
fix(uri): keep a subscribed private feed's secret out of the live episode - #423
Merged
Merged
Conversation
… the live episode
…ed by a raw link A podnotes link whose url is a subscribed private feed's real URL now opens as that feed's placeholder link. The player's episode carries the placeholder, so timestamps captured from it no longer copy the secret URL into notes.
Deploying podnotes with
|
| Latest commit: |
0e06666
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5871129f.podnotes.pages.dev |
| Branch Preview URL: | https://fix-uri-private-feed-placeho.podnotes.pages.dev |
…et out of the live episode
…aded with the secret URL
… port keeps the secret out
…om it before subscribing
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.
Why
A private feed is saved under a
podnotes-private-feed:placeholder, and its real URL lives in SecretStorage. A podnotes link that carries the real secret URL instead (an old link, or one built outside PodNotes) opened through the raw-URL path, which builds the live episode with that URL as itsfeedUrl. Saving scrubs it, so data.json stayed clean, but every timestamp captured from the playing episode wrote the secret into the note.What changed
podNotesURIHandlermaps a link URL thatisSavedFeedmatches to that saved feed's own URL before anything else. For a private feed that is its placeholder, so the link runs exactly like the feed's own placeholder links and the live episode never holds the secret. A public feed maps to itself.isSavedFeedcompares URLs as a request sends them: scheme and host in any case, with or without a default port, name the same feed; path, query and trailing slash still have to match. OPML import and Settings use the same matcher, so a saved feed stored in another spelling is no longer imported or subscribed twice.PlayerController.playreusing the loaded media for the same episode adopts the incoming copy when it is the subscription's protected form and the loaded one is not (an episode opened by its secret URL before subscribing). It never replaces a protected copy with a raw one, and it leaves the media element and position alone.Scope
Blast radius
Only links whose URL equals a saved feed's URL or its resolved secret take a different path, and that path is the existing placeholder path.
IAPIand the documented URI behavior are unchanged: links open the same episode at the same time.Verification
feedUrl, and Capture timestamp wrote it into the note while data.json stayed clean.feedUrlandurl; the captured timestamp holds only the placeholder and seeks back to 19.36 s when clicked. An old capture that still holds the secret URL resumes the playing episode without a feed request.lint,format:check,typecheck,build,test(1,729 tests),test:tooling,docs:buildandtest:e2e(77 of 77) pass.Screen recording: clicking the fixed capture
Follow-ups
Release impact
None to settings, storage, API or the URI format.
Note
Keep a subscribed private feed's secret URL out of the live episode
podNotesURIHandlerin URIHandler.ts now resolves it to the feed's placeholder URL before episode selection, so the saved secret URL is not carried into the selected episodePlayerController.playin PlayerController.ts swaps a secret-bearing selected episode to its placeholder copy during same-episode playback without recreating the media element or resetting the playback positionisSavedFeedin privateFeeds.ts now canonicalizes both URLs via a newcanonicalUrlhelper, so scheme/host case and default ports count as matches, while path, trailing-slash, query, and scheme differences still do notURLparser serialization; two URLs that only differ in casing or default-port spelling are now treated as the same feed everywhereisSavedFeedis used (OPML import, query grid, URI handling)Macroscope summarized 0e06666.