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

SSL connectivity issues #177

Closed
didinele opened this issue Apr 19, 2021 · 2 comments · Fixed by #210
Closed

SSL connectivity issues #177

didinele opened this issue Apr 19, 2021 · 2 comments · Fixed by #210

Comments

@didinele
Copy link

This seems to be an issue introduced in 0cb2981 (or somewhere in 2.0.0-beta.5) where using a URL for connecting (i.e postgres(urlHere)) works in unexpected manners when it comes to the sslmode query parameter.

Before beta 5 postgres://user:password@host:port/db?sslmode=disable worked just fine.
On beta 5 this leads into any query rejecting with "Server does not support SSL".

I'm not entirely certain if this was intended but nevertheless, it is very breaking.

Interestingly enough, a work-around I found was making the m uppercase, so ?sslMode=disable worked fine.

@porsager
Copy link
Owner

Ah thank you. Before sslmode=disable wouldn't do anything, but after implementing sslmode=required, the presence of it, even thought it's the string disabled becomes truthy.. I will make a fix asap.

@iby
Copy link
Contributor

iby commented Aug 6, 2021

@porsager v2.0.0-beta.6 this doesn't seem to be working as expected with the following error:

      Error: the string "Server does not support SSL" was thrown, throw an Error :)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)

Seems like there's a typo, it should be disable not disabled:

return x !== 'disabled' && x !== 'false' && x

Get the following when trying to use dbmate:

Error: pq: unsupported sslmode "disabled"; only "require" (default), "verify-full", "verify-ca", and "disable" supported

The official docs also use disable not disabled.

iby added a commit to iby/postgres that referenced this issue Aug 6, 2021
iby added a commit to iby/postgres that referenced this issue Aug 6, 2021
porsager pushed a commit that referenced this issue Aug 11, 2021
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

Successfully merging a pull request may close this issue.

3 participants