Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 9e5556d557e41b49e6619e44bcf9a09bf8436cba
parent 39369093937c08fd1c58b10a2f6e9087f45d4d54
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Mon, 16 Nov 2026 10:51:30 -0500

cookies screen: a slug from the state file is checked before it names a path

loadCookieStatus reads the channel config of a yt-dlp service's last clean
request; the slug comes from .service-cookies.json, so it is validated
(isValidChannelSlug) before it is joined into a path.

Co-Authored-By: Claude <noreply@anthropic.com>

Diffstat:
Meditor/app/lib/cookieStatus.ts | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/editor/app/lib/cookieStatus.ts b/editor/app/lib/cookieStatus.ts @@ -26,7 +26,7 @@ import { readServiceCookieState } from "yt-dlp-transcript-common/lib/serviceCook import { buildCookieStatus, type CookieStatusInput, type CookieStatusPayload, type YtdlpCookieInput } from "yt-dlp-transcript-common/lib/cookieStatus"; import { BROWSER_COOKIE_SERVICES, readBrowserCookieAges } from "yt-dlp-transcript-common/lib/browserCookieAge"; import { resolveCookiePolicy } from "yt-dlp-transcript-common/lib/cookiePolicy"; -import { readChannelConfig } from "yt-dlp-transcript-common/controller/channels"; +import { isValidChannelSlug, readChannelConfig } from "yt-dlp-transcript-common/controller/channels"; import { readXSessionStatus, xProfileDir } from "yt-dlp-transcript-common/social/xSessionBroker"; import { resolveXCookieSourceFor } from "yt-dlp-transcript-common/social/xBrowserLogin"; import { archiveSessionDir, readArchiveSessionStatus } from "yt-dlp-transcript-common/lib/archives/archiveTodaySession"; @@ -74,7 +74,8 @@ export async function loadCookieStatus( const ytdlp = {} as CookieStatusInput["ytdlp"]; for (const svc of BROWSER_COOKIE_SERVICES) { const channel = state.lastGood[svc]?.channel ?? state.services[svc]?.evidence.channel; - const config = channel ? await safe(() => readChannelConfig(paths, channel), null) : null; + // A slug from the state file, checked before it names a path. + const config = channel && isValidChannelSlug(channel) ? await safe(() => readChannelConfig(paths, channel), null) : null; const own = config?.cookiesFromBrowser?.trim(); const spec = settings ? resolveCookiePolicy(settings, config ?? undefined).cookies : own || undefined; const age = await readBrowserCookieAges(spec, { now, ...(opts.fresh ? { fresh: true } : {}) });