redact the core credentials from the bwt debug log

This commit is contained in:
Craig Raw
2026-08-20 13:56:59 +02:00
parent 4b373714a9
commit fb811e10ba
2 changed files with 9 additions and 2 deletions
+1 -1
Submodule lark updated: ddffe556f0...d4fdf4dac1
@@ -2,6 +2,7 @@ package com.sparrowwallet.sparrow.net;
import com.google.common.net.HostAndPort;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.annotations.SerializedName;
import com.sparrowwallet.drongo.KeyPurpose;
import com.sparrowwallet.drongo.Network;
@@ -204,7 +205,13 @@ public class Bwt {
Gson gson = new Gson();
String jsonConfig = gson.toJson(bwtConfig);
log.debug("Configuring bwt: " + jsonConfig);
if(log.isDebugEnabled()) {
JsonObject loggedConfig = gson.toJsonTree(bwtConfig).getAsJsonObject();
if(loggedConfig.has("bitcoind_auth")) {
loggedConfig.addProperty("bitcoind_auth", "*****");
}
log.debug("Configuring bwt: " + loggedConfig);
}
NativeBwtDaemon.start(jsonConfig, callback);
}