From 90b8a01b8a310adc4afcae426869e06ecb286972 Mon Sep 17 00:00:00 2001 From: Fraggar Date: Sat, 21 Mar 2026 22:26:41 +0100 Subject: [PATCH] fix: handle password-protected shares with Immich v2.6+ Immich v2.6 changed the API response for password-protected shared links from "Invalid password" to "Password required" when no password token is provided. The previous string match on the message caused the proxy to fall through to the catch-all and return 404 instead of showing the password entry page. Match on the 401 status code alone, since this endpoint only returns 401 for password-related reasons. This is backwards compatible with older Immich versions and resilient to future message wording changes. Fixes #198 Made-with: Cursor --- app/src/immich.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/immich.ts b/app/src/immich.ts index a6f7768..0e46dd8 100644 --- a/app/src/immich.ts +++ b/app/src/immich.ts @@ -200,8 +200,8 @@ class Immich { link } } - } else if (res.status === 401 && jsonBody?.message === 'Invalid password') { - // Password authentication required + } else if (res.status === 401) { + // Password authentication required (handles both "Invalid password" and "Password required" from Immich API) return { valid: true, passwordRequired: true