未验证 提交 81dc1803 编写于 作者: S Salvatore Sanfilippo 提交者: GitHub

Merge pull request #6524 from itamarhaber/acl-cli

Omits  `ACL SETUSER` from redis-cli's history
...@@ -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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册