Skip to content

qt: filter addhdkey from RPC console history - #955

Open
mateusz-klatt wants to merge 1 commit into
bitcoin-core:masterfrom
mateusz-klatt:qt-addhdkey-history-filter
Open

qt: filter addhdkey from RPC console history#955
mateusz-klatt wants to merge 1 commit into
bitcoin-core:masterfrom
mateusz-klatt:qt-addhdkey-history-filter

Conversation

@mateusz-klatt

Copy link
Copy Markdown

Filters addhdkey arguments from RPC console history, consistent with other RPCs that handle private key material.

This prevents extended private keys from being retained in history. It also covers the mnemonic and passphrase inputs proposed in bitcoin/bitcoin#35857.

Adds a parser test verifying that the arguments are redacted.

Motivation

addhdkey accepts a BIP 32 extended private key, but its arguments are currently retained in RPC console history, unlike other RPCs that handle private key material.

The same filter would also protect the mnemonic and passphrase inputs proposed in bitcoin/bitcoin#35857.

Changes

  • Add addhdkey to the RPC console sensitive-command filter.
  • Add a parser test verifying that its arguments are redacted as addhdkey(…).

Tests

  • ./build_gui/bin/test_bitcoin-qt — all tests passed, including RPCNestedTests::rpcNestedTests().

@DrahtBot

DrahtBot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline and AI policy for information on the review process.
A summary of reviews will appear here.

The addhdkey RPC accepts a BIP 32 extended private key, but it was not
added to the RPC console sensitive-command filter when introduced. As
a result, the key remains visible in console history.

Add addhdkey to the filter and cover it in rpcnestedtests.
@mateusz-klatt
mateusz-klatt force-pushed the qt-addhdkey-history-filter branch from 8cd4451 to 31467d5 Compare August 1, 2026 07:57
Copilot AI review requested due to automatic review settings August 1, 2026 07:57

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants