From 19980e53323d66b23813faca6907b82940fe24db Mon Sep 17 00:00:00 2001 From: Piotr Bulawa Date: Tue, 5 Mar 2024 10:40:28 +0100 Subject: [PATCH] Remove logging password --- .../snowflake/client/core/SFBaseSession.java | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/main/java/net/snowflake/client/core/SFBaseSession.java b/src/main/java/net/snowflake/client/core/SFBaseSession.java index 2dcb36118..35c37409f 100644 --- a/src/main/java/net/snowflake/client/core/SFBaseSession.java +++ b/src/main/java/net/snowflake/client/core/SFBaseSession.java @@ -392,31 +392,38 @@ public HttpClientSettingsKey getHttpClientKey() throws SnowflakeSQLException { boolean httpUseProxy = Boolean.parseBoolean(systemGetProperty("http.useProxy")); String httpProxyHost = systemGetProperty("http.proxyHost"); String httpProxyPort = systemGetProperty("http.proxyPort"); - String httpProxyUser = (systemGetProperty("http.proxyUser") != null) ? systemGetProperty("http.proxyUser") : ""; - String httpProxyPassword = (systemGetProperty("http.proxyPassword") != null) ? systemGetProperty("http.proxyPassword") : ""; + String httpProxyUser = + (systemGetProperty("http.proxyUser") != null) ? systemGetProperty("http.proxyUser") : ""; + String httpProxyPassword = + (systemGetProperty("http.proxyPassword") != null) + ? systemGetProperty("http.proxyPassword") + : ""; String httpsProxyHost = systemGetProperty("https.proxyHost"); String httpsProxyPort = systemGetProperty("https.proxyPort"); - String httpsProxyUser = (systemGetProperty("https.proxyUser") != null) ? systemGetProperty("https.proxyUser") : ""; - String httpsProxyPassword = (systemGetProperty("https.proxyPassword") != null) ? systemGetProperty("https.proxyPassword") : ""; + String httpsProxyUser = + (systemGetProperty("https.proxyUser") != null) + ? systemGetProperty("https.proxyUser") + : ""; + String httpsProxyPassword = + (systemGetProperty("https.proxyPassword") != null) + ? systemGetProperty("https.proxyPassword") + : ""; String httpProxyProtocol = systemGetProperty("http.proxyProtocol"); String noProxy = systemGetEnv("NO_PROXY"); String nonProxyHosts = systemGetProperty("http.nonProxyHosts"); // log the JVM parameters that are being used if (httpUseProxy) { logger.debug( - "http.useProxy={}, http.proxyHost={}, http.proxyPort={}, http.proxyUser={}," - + "http.proxyPassword={}, https.proxyHost={}, https.proxyPort={}, " - + "https.proxyUser={}, https.proxyPassword={}, http.nonProxyHosts={}," + "Proxy environment settings: http.useProxy={}, http.proxyHost={}, http.proxyPort={}, http.proxyUser={}, " + + "https.proxyHost={}, https.proxyPort={}, https.proxyUser={}, http.nonProxyHosts={}, " + "NO_PROXY={}, http.proxyProtocol={}", httpUseProxy, httpProxyHost, httpProxyPort, httpProxyUser, - httpProxyPassword, httpsProxyHost, httpsProxyPort, httpsProxyUser, - httpsProxyPassword, nonProxyHosts, noProxy, httpProxyProtocol,