refuse the bwt fallback for bitcoin core over https and ignore the legacy wallet setting for it
What changed, and why it matters
This commit changes Sparrow Wallet so that when it connects to a Bitcoin Core node over HTTPS, it no longer falls back to an older 'BWT' connection method and no longer tries to use legacy Bitcoin Core wallets. The change appears to be a hardening step: HTTPS connections now require a newer Bitcoin Core version (v24+) that supports descriptor wallets, rather than silently using older, less secure wallet handling.
Treat as a defensive hardening change. Users connecting Sparrow to Bitcoin Core over HTTPS should ensure they are running Bitcoin Core v24 or later and are using descriptor wallets. No immediate incident response is indicated by the commit alone, but the change suggests prior versions may have allowed insecure fallback behavior over HTTPS.
Security signals we found
Disables legacy wallet handling for HTTPS Bitcoin Core connections
Removes BWT fallback for HTTPS Bitcoin Core connections
Forces Bitcoin Core v24+ requirement for HTTPS connections
Prevents potential downgrade/fallback path when using encrypted Core RPC transport
Evidence from the diff
The patch modifies two files. In AppController.java, the prompt to use an existing legacy Bitcoin Core wallet is suppressed when the configured Core server uses HTTPS. In ElectrumServer.java, when the server type is BITCOIN_CORE and the protocol is HTTPS, the legacy-wallet fast-path is skipped and, if Cormorant (the descriptor-wallet integration) fails, the code now throws a ServerException telling the user to upgrade to Bitcoin Core v24+ instead of falling back to BWT. The commit message frames this as ‘refuse the bwt fallback for bitcoin core over https and ignore the legacy wallet setting for it.’
Changed components
Bitcoin Core connection logic (ElectrumServer.java)Legacy wallet prompt handling (AppController.java)BWT fallback pathHTTPS Core server configurationInspect captured patch +8 / −2
### src/main/java/com/sparrowwallet/sparrow/AppController.java
@@ -22,6 +22,7 @@
import com.sparrowwallet.sparrow.io.bbqr.BBQR;
import com.sparrowwallet.sparrow.io.bbqr.BBQRType;
import com.sparrowwallet.sparrow.net.ElectrumServer;
+import com.sparrowwallet.sparrow.net.Protocol;
import com.sparrowwallet.sparrow.net.ServerType;
import com.sparrowwallet.sparrow.settings.SettingsGroup;
import com.sparrowwallet.sparrow.settings.SettingsDialog;
@@ -3224,7 +3225,7 @@ public void cormorantScanStatus(CormorantScanStatusEvent event) {
@Subscribe
public void cormorantPruneStatus(CormorantPruneStatusEvent event) {
- if(event.legacyWalletExists()) {
+ if(event.legacyWalletExists() && Config.get().getCoreServer().getProtocol() != Protocol.HTTPS) {
Optional<ButtonType> optButtonType = AppServices.showErrorDialog("Error importing Bitcoin Core descriptor wallet",
"The connected node is pruned at " + event.getPruneDateAsString() + ", but the wallet birthday for " + event.getWallet().getFullDisplayName() + " is set to " + event.getScanDateAsString() + ".\n\n" +
"Do you want to try using the existing legacy Bitcoin Core wallet?", ButtonType.YES, ButtonType.NO);
### src/main/java/com/sparrowwallet/sparrow/net/ElectrumServer.java
@@ -3394,8 +3394,9 @@ protected FeeRatesUpdatedEvent call() throws ServerException {
ElectrumServer electrumServer = new ElectrumServer();
if(Config.get().getServerType() == ServerType.BITCOIN_CORE) {
+ boolean https = Config.get().getCoreServer() != null && Config.get().getCoreServer().getProtocol() == Protocol.HTTPS;
try {
- if(Config.get().isUseLegacyCoreWallet()) {
+ if(Config.get().isUseLegacyCoreWallet() && !https) {
throw new CormorantBitcoindException("Legacy wallet configured");
}
if(ElectrumServer.cormorant == null) {
@@ -3406,6 +3407,10 @@ protected FeeRatesUpdatedEvent call() throws ServerException {
throw new ServerException(e.getMessage());
} catch(CormorantBitcoindException e) {
ElectrumServer.cormorant = null;
+ if(https) {
+ throw new ServerException("Upgrade Bitcoin Core to v24 or later to connect over https.");
+ }
+
log.debug("Cannot start cormorant: " + e.getMessage() + ". Starting BWT...");
Bwt.initialize();Why this scored 32/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.