From 9b58bf47adbd5d2d41b1784532d3a8aa84360056 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Sun, 11 May 2025 20:05:10 -0400 Subject: [PATCH] Do not print auth token to logs --- .../components/Services/LoungeService/LongPoller.bs | 2 +- playlet-lib/src/source/services/HttpClient.bs | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/playlet-lib/src/components/Services/LoungeService/LongPoller.bs b/playlet-lib/src/components/Services/LoungeService/LongPoller.bs index 353163cb..e5f480d7 100644 --- a/playlet-lib/src/components/Services/LoungeService/LongPoller.bs +++ b/playlet-lib/src/components/Services/LoungeService/LongPoller.bs @@ -49,7 +49,7 @@ class LongPoller LogInfo(`Sending long polling GET ${url}`, "ID:", socket.GetID()) #if DEBUG - ? `════════ curl command ════════\n${m.ToCurlCommand()}\n══════════════════════════════` + ? `======== curl command ========\n${m.ToCurlCommand()}\n==============================` #end if message = `GET ${urlObject.path} HTTP/1.1\r\n` diff --git a/playlet-lib/src/source/services/HttpClient.bs b/playlet-lib/src/source/services/HttpClient.bs index 099da2c9..f1fc0a86 100644 --- a/playlet-lib/src/source/services/HttpClient.bs +++ b/playlet-lib/src/source/services/HttpClient.bs @@ -321,7 +321,15 @@ namespace HttpClient if m._headers <> invalid for each key in m._headers - command += ` \\\n -H '${key}: ${m._headers[key]}'` + #if DEBUG + command += ` \\\n -H '${key}: ${m._headers[key]}'` + #else + if LCase(key) = "authorization" + command += ` \\\n -H '${key}: '` + else + command += ` \\\n -H '${key}: ${m._headers[key]}'` + end if + #end if end for end if