Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/postgresql/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/postgresql",
"version": "2.2.1",
"version": "2.2.2",
"description": "Pipedream PostgreSQL Components",
"main": "postgresql.app.mjs",
"keywords": [
Expand Down
5 changes: 4 additions & 1 deletion components/postgresql/postgresql.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,12 @@ export default {
...(cert && {
cert,
}),
rejectUnauthorized: mode !== "skip_verification",
};

if (mode === "verify_identity") {
ssl.rejectUnauthorized = true;
}
Comment on lines +98 to +100
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this wouldn't allow setting rejectUnauthorized to false, which someone may want to do to connect without CA verification to a server that requires SSL. (It looks like the pg package sets rejectUnauthorized to true by default for SSL connections.)

Maybe set ssl.rejectUnauthorized if mode is not null, and omit it otherwise? For example:

      if (mode) {
        ssl.rejectUnauthorized = mode === "verify_identity";
      }


return Object.keys(ssl).length > 0
? ssl
: undefined;
Expand Down
35 changes: 23 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading