From aa2beb584681b4a894972aa246b0838defdd7864 Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Mon, 10 Aug 2026 20:53:53 +0000 Subject: [PATCH] fix: Check for ENV prefix with startsWith instead of includes #668 --- src/backend/scrobblers/ScrobbleClients.ts | 2 +- src/backend/sources/ScrobbleSources.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/scrobblers/ScrobbleClients.ts b/src/backend/scrobblers/ScrobbleClients.ts index 64d7a940..9adefe35 100644 --- a/src/backend/scrobblers/ScrobbleClients.ts +++ b/src/backend/scrobblers/ScrobbleClients.ts @@ -184,7 +184,7 @@ export default class ScrobbleClients { const envSchema = await getClientEnvSchema(clientType); const configTypeUpper = envSchema.prefix.toUpperCase(); - const clientKeys = envKeys.filter(x => x.includes(configTypeUpper)); + const clientKeys = envKeys.filter(x => x.startsWith(configTypeUpper)); if (clientKeys.length > 0) { clientUnparsedConfigs.push({ config: pick(process.env, ...clientKeys), diff --git a/src/backend/sources/ScrobbleSources.ts b/src/backend/sources/ScrobbleSources.ts index 4ca47291..c5ebc2a1 100644 --- a/src/backend/sources/ScrobbleSources.ts +++ b/src/backend/sources/ScrobbleSources.ts @@ -203,7 +203,7 @@ export default class ScrobbleSources { const envSchema = await getSourceEnvSchema(configType); const configTypeUpper = envSchema.prefix.toUpperCase(); - const configKeys = envKeys.filter(x => x.includes(configTypeUpper)); + const configKeys = envKeys.filter(x => x.startsWith(configTypeUpper)); if (configKeys.length > 0) { sourceUnparsedConfigs.push({ config: pick(process.env, ...configKeys), -- 2.51.2