redis-cli: some refactoring about not logging AUTH & co.
This commit is contained in:
parent
81dc180323
commit
d7a87d0ea4
@ -1946,11 +1946,19 @@ static void repl(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Won't save auth or acl setuser commands in history file */
|
/* Won't save auth or acl setuser commands in history file */
|
||||||
if (!(argv && argc > 0 &&
|
int dangerous = 0;
|
||||||
(!strcasecmp(argv[0+skipargs], "auth") ||
|
if (argv && argc > 0) {
|
||||||
(skipargs + 1 < argc &&
|
if (!strcasecmp(argv[skipargs], "auth")) {
|
||||||
!strcasecmp(argv[0+skipargs], "acl") &&
|
dangerous = 1;
|
||||||
!strcasecmp(argv[0+skipargs+1], "setuser"))))) {
|
} else if (skipargs+1 < argc &&
|
||||||
|
!strcasecmp(argv[skipargs], "acl") &&
|
||||||
|
!strcasecmp(argv[skipargs+1], "setuser"))
|
||||||
|
{
|
||||||
|
dangerous = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!dangerous) {
|
||||||
if (history) linenoiseHistoryAdd(line);
|
if (history) linenoiseHistoryAdd(line);
|
||||||
if (historyfile) linenoiseHistorySave(historyfile);
|
if (historyfile) linenoiseHistorySave(historyfile);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user