Share never hands over a private feed's file (#455)

Share on a paid episode's file gave the file's own address, which for
Patreon is patreon.com/api/rss/u/<your id>/e/<n>.mp3?sig=..., signed for
the subscriber: whoever got it could download the episode as them. A
private feed's episode is now shared by its page alone, from the file
too, and with no page there is nothing to share. The access warning
matched any patreon.com address, so it warned on a post's page, which
asks for a sign-in and carries nothing of yours; it now matches
Patreon's feed and file addresses only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RqkrVA8TdTxe556JB3sR1n
This commit is contained in:
2026-11-13 17:34:17 +00:00
parent 45ef1e83f2
commit 757ce5fbb3
5 changed files with 35 additions and 7 deletions

View File

@@ -216,7 +216,9 @@ async function share(title: string, url: string, btn?: HTMLElement){
await sendLink(title, url, btn);
}
const carriesAccess=(url: string)=>/patreon\.com\/|\/\/[^/]*@|[?&][^=]*(auth|token|key|secret|pass|sig)[^=]*=/i.test(url);
// Patreon's feed and its files, not every patreon.com address: a post's page asks whoever opens it
// to sign in, and carries nothing of yours (#455).
const carriesAccess=(url: string)=>/patreon\.com\/(api\/)?rss\b|\/\/[^/]*@|[?&][^=]*(auth|token|key|secret|pass|sig)[^=]*=/i.test(url);
const ACCESS_WARNING='This address looks like it includes your own access to the feed, and anyone you '
+'send it to could use it as you.';