summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordejun.xdj <dejun.xdj@alibaba-inc.com>2018-05-16 16:15:12 +0800
committerantirez <antirez@gmail.com>2018-05-29 12:45:11 +0200
commitfca99e413a411fe7a39a4fb1da584acee95fc47b (patch)
tree6919a9dd5661e85d3f7596f69c00d082c02e621d /src
parent01407a3a42b753ea0aea1774322a58a4d37a04e4 (diff)
downloadredis-fca99e413a411fe7a39a4fb1da584acee95fc47b.tar.gz
Add warning message when using password on command line
Diffstat (limited to 'src')
-rw-r--r--src/redis-cli.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c
index 45f26f04b..ff1cd5a94 100644
--- a/src/redis-cli.c
+++ b/src/redis-cli.c
@@ -1088,6 +1088,7 @@ static int parseOptions(int argc, char **argv) {
} else if (!strcmp(argv[i],"-n") && !lastarg) {
config.dbnum = atoi(argv[++i]);
} else if (!strcmp(argv[i],"-a") && !lastarg) {
+ fputs("Warning: Using a password on the command line interface can be insecure.\n", stderr);
config.auth = argv[++i];
} else if (!strcmp(argv[i],"-u") && !lastarg) {
parseRedisUri(argv[++i]);