From c8cce4176a0eb09a44edc8dc1a6db84c5fff6c13 Mon Sep 17 00:00:00 2001 From: Viren070 Date: Sat, 25 Oct 2025 15:02:16 +0100 Subject: [PATCH] fix: normalise redirect url when extracting infohash --- packages/core/src/utils/torrent.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/core/src/utils/torrent.ts b/packages/core/src/utils/torrent.ts index a87e5d3b..f8120f1b 100644 --- a/packages/core/src/utils/torrent.ts +++ b/packages/core/src/utils/torrent.ts @@ -138,7 +138,9 @@ export class TorrentClient { const redirectUrl = response.headers.get('Location'); if (!redirectUrl) throw new Error('Redirect location not found'); - const hash = validateInfoHash(extractInfoHashFromMagnet(redirectUrl)); + const hash = validateInfoHash( + extractInfoHashFromMagnet(redirectUrl.toLowerCase()) + ); if (!hash) { if (redirectCount >= 3) { throw new Error(`Too many redirects: ${redirectUrl}`);