Unverified Commit 81dc1803 authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo Committed by GitHub
Browse files

Merge pull request #6524 from itamarhaber/acl-cli

Omits  `ACL SETUSER` from redis-cli's history
parents 476333d1 9f32d0ee
...@@ -1945,8 +1945,12 @@ static void repl(void) { ...@@ -1945,8 +1945,12 @@ static void repl(void) {
} }
} }
/* Won't save auth command in history file */ /* Won't save auth or acl setuser commands in history file */
if (!(argv && argc > 0 && !strcasecmp(argv[0+skipargs], "auth"))) { if (!(argv && argc > 0 &&
(!strcasecmp(argv[0+skipargs], "auth") ||
(skipargs + 1 < argc &&
!strcasecmp(argv[0+skipargs], "acl") &&
!strcasecmp(argv[0+skipargs+1], "setuser"))))) {
if (history) linenoiseHistoryAdd(line); if (history) linenoiseHistoryAdd(line);
if (historyfile) linenoiseHistorySave(historyfile); if (historyfile) linenoiseHistorySave(historyfile);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment