Page MenuHomePhabricator

[Qt] Don't add arguments of sensitive command to console window
ClosedPublic

Authored by jasonbcox on Oct 23 2018, 23:41.

Details

Summary

At the moment, we hide sensitive command arguments from the console history but not from the console window.
This tiny change will also hide the arguments from the console window.

Especially for "importmulti", this may be a little bit annoying because if one executes a command with invalid arguments, you need to start type in everything again.

Ideally we would only filter the command if sensitive arguments have been used (complicated to implement).

List of sensitive commands:

const QStringList historyFilter = QStringList()
    << "importprivkey"
    << "importmulti"
    << "signmessagewithprivkey"
    << "signrawtransaction"
    << "walletpassphrase"
    << "walletpassphrasechange"
    << "encryptwallet";

}

Backport of Core PR10093
Completes T444

Test Plan

ninja

Diff Detail

Repository
rABC Bitcoin ABC
Branch
pr10093
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3671
Build 5417: Bitcoin ABC Buildbot (legacy)
Build 5416: arc lint + arc unit

Event Timeline

deadalnix requested changes to this revision.Oct 24 2018, 23:25

Same as D1963 and D1964, description needs to be updated, but the code is all good.

This revision now requires changes to proceed.Oct 24 2018, 23:25
jasonbcox edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Oct 25 2018, 22:00
This revision was automatically updated to reflect the committed changes.