laixintao / iredis

Interactive Redis: A Terminal Client for Redis with AutoCompletion and Syntax Highlighting.
https://iredis.xbin.io
BSD 3-Clause "New" or "Revised" License
2.55k stars 111 forks source link

password contains @ #487

Closed Meaningisuse closed 7 months ago

Meaningisuse commented 8 months ago
image image
laixintao commented 8 months ago

Ha! never thought about that case! thanks, will fix later.

laixintao commented 8 months ago

Hi @Meaningisuse after checking from the code, I found it should handle the case that password containing @, maybe the @ is not the issue? can see https://github.com/laixintao/iredis/pull/488/files , I add a test case and it passed.

can you give me a full alias_dsn line that can reproduce your issue? so I can reproduce then fix it. (please don't give me your real password, can fake one or change some characters of the domain and password of this one)

thanks.

Meaningisuse commented 8 months ago

Hi @Meaningisuse after checking from the code, I found it should handle the case that password containing @, maybe the @ is not the issue? can see https://github.com/laixintao/iredis/pull/488/files , I add a test case and it passed.

can you give me a full alias_dsn line that can reproduce your issue? so I can reproduce then fix it. (please don't give me your real password, can fake one or change some characters of the domain and password of this one)

thanks.

[alias_dsn] test=redis://030b5bdf-7b61-4101-a7a8-a891b9beba65@Hr1FJTRi7bDLcPQa@audit.test.com:30265/2

laixintao commented 8 months ago

Oh I saw the issue now: the : can not be eliminated:

If you only have password, write like this:

test=redis://:030b5bdf-7b61-4101-a7a8-a891b9beba65@Hr1FJTRi7bDLcPQa@audit.test.com:30265/2

without : the url parser is confused, it would think the whole line is a domain.

https://github.com/laixintao/iredis/blob/master/iredis/data/iredisrc#L83

laixintao commented 7 months ago

Hi @Meaningisuse I am going to close this issue as this is not a bug, feel free to reopen if you still have issues ;D