Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis Password not properly being encoded #947

Open
DarDarBonks opened this issue Mar 13, 2025 · 0 comments
Open

Redis Password not properly being encoded #947

DarDarBonks opened this issue Mar 13, 2025 · 0 comments

Comments

@DarDarBonks
Copy link

Version
0.24.1

Describe the bug
If you use redis with a password & the password contains special characters, it is not properly being encoded in the url and dawarich fails to connect.

To Reproduce
Use special characters in your password for your redis

Log Example
URI::InvalidURIError: bad URI (is not URI?): "redis://:okf^*g$dofi%n8348$fdgdlfg$@redis:6379/1" (URI::InvalidURIError)
/var/app/vendor/bundle/ruby/3.4.0/gems/uri-1.0.2/lib/uri/rfc3986_parser.rb:130:in 'URI::RFC3986_Parser#split'
/var/app/vendor/bundle/ruby/3.4.0/gems/uri-1.0.2/lib/uri/rfc3986_parser.rb:135:in 'URI::RFC3986_Parser#parse'
/var/app/vendor/bundle/ruby/3.4.0/gems/uri-1.0.2/lib/uri/common.rb:208:in 'URI.parse'
/var/app/vendor/bundle/ruby/3.4.0/gems/uri-1.0.2/lib/uri/common.rb:869:in 'Kernel#URI'
/var/app/vendor/bundle/ruby/3.4.0/gems/redis-client-0.23.2/lib/redis_client/url_config.rb:11:in 'RedisClient::URLConfig#initialize'
/var/app/vendor/bundle/ruby/3.4.0/gems/redis-client-0.23.2/lib/redis_client/config.rb:212:in 'Class#new'
/var/app/vendor/bundle/ruby/3.4.0/gems/redis-client-0.23.2/lib/redis_client/config.rb:212:in 'RedisClient::Config#initialize'
/var/app/vendor/bundle/ruby/3.4.0/gems/redis-client-0.23.2/lib/redis_client.rb:174:in 'Class#new'
/var/app/vendor/bundle/ruby/3.4.0/gems/redis-client-0.23.2/lib/redis_client.rb:174:in 'RedisClient.config'
/var/app/vendor/bundle/ruby/3.4.0/gems/redis-5.3.0/lib/redis/client.rb:23:in 'Redis::Client.config'
/var/app/vendor/bundle/ruby/3.4.0/gems/redis-5.3.0/lib/redis.rb:142:in 'Redis#initialize_client'
/var/app/vendor/bundle/ruby/3.4.0/gems/redis-5.3.0/lib/redis.rb:73:in 'Redis#initialize'


Maybe split up the redis config into multiple environment variables and make sure to encode the password for url?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant