Add warning message when using password on command line

This commit is contained in:
dejun.xdj 2018-05-16 16:15:12 +08:00 committed by antirez
parent 01407a3a42
commit fca99e413a

View File

@ -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]);