-
Notifications
You must be signed in to change notification settings - Fork 326
Comment out sensitive console commands in history to prevent re-execution #909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Comment out sensitive console commands in history to prevent re-execution #909
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
🚧 At least one of the CI tasks failed. HintsTry to run the tests locally, according to the documentation. However, a CI failure may still
Leave a comment here, if you need help tracking down a confusing failure. |
2f59bf6 to
a0422e5
Compare
| connect(m_executor, &RPCExecutor::noop, this, [this]() { | ||
| ui->messagesWidget->undo(); | ||
| scrollToEnd(); | ||
| m_is_executing = false; | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this need a signal/slot?
| "Lines starting with '#' are treated as comments and are not executed.\n" | ||
| " example: # Hello world\n\n"))); | ||
| return; | ||
| } else if (executableCommand.starts_with("#")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably check this before parsing (top of RPCConsole::on_lineEdit_returnPressed)
Prefix filtered commands with "#" before adding them to the RPC console history.
Console lines starting with "#" are ignored by the executor, preventing accidental re-execution of filtered sensitive commands when recalled from history.
Also adds a noop signal to handle ignored commands cleanly and documents comment behavior in the console help text (
help-console).