From 9f1856268c9dfb8ef56f1778aa4ef99f9d504bff Mon Sep 17 00:00:00 2001 From: "dejun.xdj" Date: Thu, 28 Jun 2018 19:09:22 +0800 Subject: [PATCH] Check if password is used on command line interface. --- src/redis-cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redis-cli.c b/src/redis-cli.c index b6acfefc..3e44d2c7 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -1390,7 +1390,7 @@ static int parseOptions(int argc, char **argv) { exit(1); } - if (!config.no_auth_warning) { + if (!config.no_auth_warning && config.auth != NULL) { fputs("Warning: Using a password with '-a' or '-u' option on the command" " line interface may not be safe.\n", stderr); }