summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordejun.xdj <dejun.xdj@alibaba-inc.com>2018-06-28 19:09:22 +0800
committerdejun.xdj <dejun.xdj@alibaba-inc.com>2018-06-28 19:09:22 +0800
commit9f1856268c9dfb8ef56f1778aa4ef99f9d504bff (patch)
tree2ae049826c0375df8f7a980e277f3053f1e653b8
parent1139070a0ffd4fcf79a1420241746b9c626625ce (diff)
downloadredis-9f1856268c9dfb8ef56f1778aa4ef99f9d504bff.tar.gz
Check if password is used on command line interface.
-rw-r--r--src/redis-cli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c
index b6acfefc9..3e44d2c7c 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);
}