Commit a87c8ac
committed
qt: Prevent re-execution of sensitive commands from console history
Sensitive RPC commands such as `walletpassphrase` or `createwallet`
may appear in the console history with their arguments redacted. Previously,
these entries could still be re-executed if recalled, potentially causing
unintended actions.
This change prefixes redacted history entries with a leading character(`!`),
marking them as non-executable when called. The console blocks their
execution and informs the user that the command was redacted.
The help text in `help-console` has been updated to explain this behavior.
Test coverage is updated to verify redaction prefixing and ensure commands
are properly filtered.1 parent 5c5704e commit a87c8ac
2 files changed
+32
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
364 | 368 | | |
365 | 369 | | |
366 | 370 | | |
| |||
405 | 409 | | |
406 | 410 | | |
407 | 411 | | |
408 | | - | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
409 | 417 | | |
410 | 418 | | |
411 | 419 | | |
| |||
994 | 1002 | | |
995 | 1003 | | |
996 | 1004 | | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
997 | 1015 | | |
998 | 1016 | | |
999 | 1017 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
88 | 95 | | |
89 | | - | |
| 96 | + | |
90 | 97 | | |
91 | | - | |
| 98 | + | |
92 | 99 | | |
93 | | - | |
| 100 | + | |
94 | 101 | | |
95 | | - | |
| 102 | + | |
96 | 103 | | |
97 | | - | |
| 104 | + | |
98 | 105 | | |
99 | | - | |
| 106 | + | |
100 | 107 | | |
101 | 108 | | |
102 | 109 | | |
| |||
0 commit comments