omit bound values from wallet database error messages, and the entered text from the terminal descriptor import log
What changed, and why it matters
This commit removes sensitive information from two log/error locations: it stops H2 database error messages from including the actual data values involved in a failed SQL statement, and it stops terminal wallet logs from recording the exact text a user typed when importing a wallet descriptor. These changes reduce the risk that passwords, keys, or other private wallet data accidentally end up in application logs where they could be read by other users or attackers.
Treat as a low-to-moderate information-disclosure hardening improvement. Review the drongo submodule bump separately to confirm it does not introduce unrelated changes. No urgent patching action is required unless logs are shared or stored in an insecure location.
Security signals we found
Sensitive data removed from log/error messages
SQL bound parameter values suppressed in exceptions
User-entered wallet descriptor no longer logged
Information disclosure risk reduction
Evidence from the diff
The patch makes two defensive changes. In DbPersistence.java, it configures JDBI’s StatementExceptions to use MessageRendering.NONE, which prevents bound SQL parameter values from being rendered into exception messages. In WatchOnlyDialog.java, it removes the user-supplied descriptor text from a log.error call, logging only a generic failure message while still including the exception. The drongo submodule is also bumped, but no diff is provided. The changes are consistent with preventing sensitive data leakage into logs, not with fixing a remote code execution or cryptographic flaw.
Changed components
Sparrow Wallet database persistence layer (DbPersistence.java)Sparrow Wallet terminal watch-only import dialog (WatchOnlyDialog.java)drongo submodule (commit bump only, no diff supplied)Inspect captured patch +4 / −2
### drongo
@@ -1 +1 @@
-Subproject commit 57e879dff3569dc4e8fd68e7a4efd088528b05b6
+Subproject commit 18516bbbe2bfc3ab2a4af6bd319eb2e5152db28c
### src/main/java/com/sparrowwallet/sparrow/io/db/DbPersistence.java
@@ -46,6 +46,7 @@
import org.h2.value.VersionedValue;
import org.jdbi.v3.core.Jdbi;
import org.jdbi.v3.core.h2.H2DatabasePlugin;
+import org.jdbi.v3.core.statement.StatementExceptions;
import org.jdbi.v3.sqlobject.SqlObjectPlugin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -998,6 +999,7 @@ private Jdbi getJdbi(Storage storage, String password) throws StorageException {
Jdbi jdbi = Jdbi.create(getDataSource(storage, password));
jdbi.installPlugin(new H2DatabasePlugin());
jdbi.installPlugin(new SqlObjectPlugin());
+ jdbi.getConfig(StatementExceptions.class).setMessageRendering(StatementExceptions.MessageRendering.NONE);
return jdbi;
}
### src/main/java/com/sparrowwallet/sparrow/terminal/wallet/WatchOnlyDialog.java
@@ -112,7 +112,7 @@ protected List<Wallet> getWallets() throws ImportException {
try {
return getWalletFromOutputDescriptor(text);
} catch(Exception e) {
- log.error("Could not determine wallet from descriptor: " + text, e);
+ log.error("Could not determine wallet from descriptor", e);
throw new ImportException("Could not determine wallet from descriptor: " + e.getMessage(), e);
}
}Why this scored 49/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.