Repository navigation
Verify the server certificate against an IP host instead of localhost - #1309
Merged
Merged
Conversation
Owner
|
🎉 |
ivan
added a commit
to ludios/postgres
that referenced
this pull request
Nov 14, 2026
… lacks - "Every option is checked" was false: only the numbers, the on-or-off options, ssl, sslnegotiation and target_session_attrs are, and a misspelt option name is ignored. - Upstream's idle_timeout of 30 days does not close a connection: it starts a timer every millisecond. Only max_lifetime closes at once. This fork cuts such a timeout to 24.8 days, which the text now says. - Upstream is not without output or hooks: it prints notices and replication errors, and has the same tracing channels. - "Its API is upstream's apart from what this section lists" promised a complete list. The lists now say that they are not complete, and the second one has the fixes that upstream made after the fork point (porsager#1309, porsager#1304, porsager#1321, porsager#1320, the daylight saving gap), the settings that only upstream accepts, the looser types, `json` on a transform and the deleted test runners. - The sql.listen, COPY and names bullets say what happens, instead of only naming the situations. Model-output: Claude Mythos 5.2 Session-file: ~/.claude/projects/-home-at-code-js-postgres/626cf68e-b4b7-407c-8737-9fe2b26565d7.jsonl Co-Authored-By: Claude Mythos 5.2 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With
ssl: 'verify-full'(orssl: true) and an IP as the host, the certificate is checked againstlocalhost.upgradepasses nohosttotls.connectand leavesservernameempty for an IP. Node then falls back tosocket._host, which it only sets after a DNS lookup, and ends at'localhost'.On PostgreSQL 15 and Node 22, connecting to
127.0.0.1:DNS:localhostonlyERR_TLS_CERT_ALTNAME_INVALIDIP:127.0.0.1Host: localhostSo a certificate for
localhostfrom a trusted CA passes for any IP, and a correct certificate for the IP fails. Direct TLS is not affected, as it passeshost.Added a unit test to
tests/unit/socket.jsand a changelog entry. The test fails without the change, and the unit tests pass with it. I did not run the integration suite.