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

Can't use passwords with symbols #230

Open
jonas-zipprick opened this issue Sep 27, 2016 · 4 comments
Open

Can't use passwords with symbols #230

jonas-zipprick opened this issue Sep 27, 2016 · 4 comments
Assignees
Labels
enhancement Improve what already exist.

Comments

@jonas-zipprick
Copy link

nobrainers uri parsing breaks when using passwords that include signs like '/' or '@'

@nviennot
Copy link
Collaborator

I pushed a fix. You may use %2F or %40 in the password for such characters

nviennot added a commit that referenced this issue Sep 27, 2016
This allow to use special symbols.

Fixes #230
@zedtux
Copy link
Collaborator

zedtux commented Apr 30, 2021

@nviennot shouldn't be the opposite, shouldn't Nobrainer use URI.escape on the given password?

For instance I'm deploying a RethinkDB cluster in Kubernetes. I have the password in a Secret and both the cluster and the Rails app take the password from that Secret.
Following what you did, I should change my app in order to URI.escape before passing it to Nobrainer, therefor noway for me to use environment variables.

Now if Nobrainer would apply the URI.escape on the given password (as Nobrainer builds an URL), then the password is escaped and we can use environment variables again.

What's your input about this?

@zedtux zedtux added the enhancement Improve what already exist. label Apr 30, 2021
@nviennot
Copy link
Collaborator

nviennot commented May 3, 2021

You can use environment variables, just URI encode the username/password.
Or we should have a better parsing logic.
I'm not entirely sure I understand the issue. Feel free to revert the commit.

@zedtux
Copy link
Collaborator

zedtux commented May 4, 2021

Given a Kubernetes Secret which holds the RethinkDB password to be used:

  • by the RethinkDB cluster operator or Helm chart to initialise the database
  • by the Rails application in order to authenticate against the database

On the Rails, I agree with you, it would be possible to URI encore the username/password and it would work, but then it wouldn't make it on the RethinkDB side, since it would use the given string as a password.

Second, NoBrainer is building an URL, so it make sense that it escape characters.

@zedtux zedtux reopened this May 4, 2021
@zedtux zedtux self-assigned this May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve what already exist.
Projects
None yet
Development

No branches or pull requests

3 participants