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 passwords don't accept spaces #51

Open
alexdesousa opened this issue Dec 3, 2015 · 1 comment
Open

Redis passwords don't accept spaces #51

alexdesousa opened this issue Dec 3, 2015 · 1 comment
Milestone

Comments

@alexdesousa
Copy link

Hello,

I was having problems connecting to my Redis database, always receiving this error:

** (EXIT from #PID<0.163.0>) {:connection_error, {:authentication_error, {:unexpected_data, {:ok, "-ERR wrong number of arguments for 'auth' command\r\n"}}}}

In my Elixir configuration I had:

config :exredis,
  host: "localhost",
  port: 6379,
  password: "Password with spaces.",
  db: 1,
  reconnect: :no_reconnect,
  max_queue: :infinity

To make the library work with my password, I had to change the password field of the configuration to:

(...)
  password: "\"Password with spaces.\"",
(...)

Tracing the bug, I got to the authentication functions in eredis. When I executed the following:

{ok, C} = eredis:start_link("localhost", 6379, 1, "Password with spaces.")

I got:

** exception exit: {connection_error,{authentication_error,{unexpected_data,{ok,<<"-ERR wrong number of arguments for 'auth' command\r\n">>}}}}

I already made a pull request to eredis with a patch to this bug.

Anyway, thank you for the library.

TL;DR: At the moment, eredis is not accepting passwords with spaces and exredis inherits this problem. Earlier this day, I made a pull request to eredis that fixes this bug in eredis, but I am waiting for approval.

@artemeff
Copy link
Owner

artemeff commented Dec 3, 2015

Thank you 👍 I'll update dependency when PR is merged.

@artemeff artemeff added this to the 1.0.0 milestone Dec 23, 2015
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

2 participants