password can't have "%"
lnnt opened this issue · 1 comments
lnnt commented
Describe the bug
when password is "abcde%", output of rct is:
$ ./rct -f resp -s redis://127.0.0.1:6379?authPassword=abcde% -o appendonly.aof
Invalid options: '--source=<source>'
when password is "abc%de", output of rct is:
$ ./rct -f resp -s redis://127.0.0.1:6379?authPassword=abc%de -o appendonly.aof
Exception in thread "main" java.lang.AssertionError: [AUTH #5644a22d4cf293351dea2b983513cd2985ea02e42e486c03596c97fe210aeb45] failed. WRONGPASS invalid username-password pair or user is disabled.
at com.moilioncircle.redis.replicator.RedisSocketReplicator.auth(RedisSocketReplicator.java:215)
at com.moilioncircle.redis.replicator.RedisSocketReplicator.establishConnection(RedisSocketReplicator.java:184)
at com.moilioncircle.redis.replicator.RedisSocketReplicator$RedisSocketReplicatorRetrier.connect(RedisSocketReplicator.java:377)
at com.moilioncircle.redis.replicator.AbstractReplicatorRetrier.retry(AbstractReplicatorRetrier.java:46)
at com.moilioncircle.redis.replicator.RedisSocketReplicator.open(RedisSocketReplicator.java:115)
at com.moilioncircle.redis.rdb.cli.ext.CliRedisReplicator.open(CliRedisReplicator.java:212)
at com.moilioncircle.redis.rdb.cli.cmd.XRct.call(XRct.java:119)
at com.moilioncircle.redis.rdb.cli.cmd.XRct.call(XRct.java:47)
at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine.execute(CommandLine.java:2078)
at com.moilioncircle.redis.rdb.cli.Rct.main(Rct.java:28)
Version:
$ ./rct -V
redis rdb cli: v0.7.0 (339cd58f3d8a07c41682e55f92842bd055523c33: 2021-07-20T14:02:15+0000)
home: /mnt/d/code/java/redis-rdb-cli-release/bin/..
java version: 17, vendor: Private Build
java home: /usr/lib/jvm/java-17-openjdk-amd64
default locale: en, platform encoding: UTF-8
os name: Linux, version: 4.4.0-19041-Microsoft, arch: amd64
leonchen83 commented
%
in url shoud be encode
try
$ ./rct -f resp -s redis://127.0.0.1:6379?authPassword=abcde%25 -o appendonly.aof
and try
$ ./rct -f resp -s redis://127.0.0.1:6379?authPassword=abc%25de -o appendonly.aof