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

Deleting instances with empty password fails #23

Open
pacman82 opened this issue Jan 16, 2018 · 3 comments
Open

Deleting instances with empty password fails #23

pacman82 opened this issue Jan 16, 2018 · 3 comments

Comments

@pacman82
Copy link

Server returns status failed (in http body). Msg is:

Could not connect to postgres instance: fe_sendauth: no password supplied

http code is 200 ok.

As it stands now, one can create instances with an empty password, but not delete them.

@sebastianneubauer
Copy link
Member

To me this looks like an empty password is not valid, at least the error message comes directly from the postgres login using psycopg
What about checking explicitely for an nonempty passwors at creation time of the instance?
Opinions?
One thing to consider might be: Is this backend dependent? it might be totally valid for a local postgres to accept empty passwords?

@theMarix
Copy link

theMarix commented Feb 2, 2018

In Postgres 9 the empty string is a valid password. The error in this case stems from the client library. It seems Psycopg2 does not even attempt password authentication in this case. A wrong password gives a different error message.
However, Postgresql 10 will disable the password if it is an empty string. Given that this will give us an unusable database anyways then we should just completely prevent the creation of databases with empty strings as password. It's a bad idea anyhow.

@pacman82
Copy link
Author

pacman82 commented Feb 2, 2018

@theMarix Thank you.

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

3 participants