From f266e26aa270a7228f70b2e1e93a0dc7306e865d Mon Sep 17 00:00:00 2001 From: Ilango Date: Wed, 30 Jul 2025 12:12:06 +0530 Subject: [PATCH] Redact credentials --- packages/server/src/queue/QueueManager.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/server/src/queue/QueueManager.ts b/packages/server/src/queue/QueueManager.ts index 012f25f8d..7a17cfd16 100644 --- a/packages/server/src/queue/QueueManager.ts +++ b/packages/server/src/queue/QueueManager.ts @@ -152,7 +152,10 @@ export class QueueManager { // Add connection event logging for prediction queue if (predictionQueue.getQueue().opts.connection) { const connInfo = predictionQueue.getQueue().opts.connection || {} - logger.info(`[QueueManager] Prediction queue connected to Redis: ${JSON.stringify(connInfo)}`) + const connInfoString = JSON.stringify(connInfo) + .replace(/"username":"[^"]*"/g, '"username":"[REDACTED]"') + .replace(/"password":"[^"]*"/g, '"password":"[REDACTED]"') + logger.info(`[QueueManager] Prediction queue connected to Redis: ${connInfoString}`) } this.predictionQueueEventsProducer = new QueueEventsProducer(predictionQueue.getQueueName(), { @@ -172,7 +175,10 @@ export class QueueManager { // Add connection event logging for upsert queue if (upsertionQueue.getQueue().opts.connection) { const connInfo = upsertionQueue.getQueue().opts.connection || {} - logger.info(`[QueueManager] Upsert queue connected to Redis: ${JSON.stringify(connInfo)}`) + const connInfoString = JSON.stringify(connInfo) + .replace(/"username":"[^"]*"/g, '"username":"[REDACTED]"') + .replace(/"password":"[^"]*"/g, '"password":"[REDACTED]"') + logger.info(`[QueueManager] Upsert queue connected to Redis: ${connInfoString}`) } if (serverAdapter) {