From 42cb3c76e84e7a97bff66ab3992c74ecaf73d4ce Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Mon, 18 May 2026 12:29:15 -0600 Subject: [PATCH] Fix setOptions cache poisoning when one node's auth load fails --- backend/utils/common.js | 6 +++--- server/utils/common.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/utils/common.js b/backend/utils/common.js index 91dbe64d..c6e8f569 100644 --- a/backend/utils/common.js +++ b/backend/utils/common.js @@ -192,11 +192,11 @@ export class CommonService { } }; this.setOptions = (req) => { - if (this.nodes[0].authentication.options && this.nodes[0].authentication.options.headers) { - return; - } if (this.nodes && this.nodes.length > 0) { this.nodes.forEach((node) => { + if (node.authentication.options && node.authentication.options.headers) { + return; + } node.authentication.options = { url: '', rejectUnauthorized: false, diff --git a/server/utils/common.ts b/server/utils/common.ts index f86ce407..0af97283 100644 --- a/server/utils/common.ts +++ b/server/utils/common.ts @@ -204,9 +204,9 @@ export class CommonService { }; public setOptions = (req) => { - if (this.nodes[0].authentication.options && this.nodes[0].authentication.options.headers) { return; } if (this.nodes && this.nodes.length > 0) { this.nodes.forEach((node) => { + if (node.authentication.options && node.authentication.options.headers) { return; } node.authentication.options = { url: '', rejectUnauthorized: false,