File tree Expand file tree Collapse file tree
packages/pg-connection-string Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -133,6 +133,16 @@ function parse(str, options = {}) {
133133 case 'require' :
134134 case 'verify-ca' :
135135 case 'verify-full' : {
136+ if ( config . sslmode !== 'verify-full' ) {
137+ console . warn ( `SECURITY WARNING: The SSL modes 'prefer', 'require', and 'verify-ca' are treated as aliases for 'verify-full'.
138+ In the next major version (v3.0.0), these modes will adopt standard libpq semantics, which have weaker security guarantees.
139+
140+ To prepare for this change:
141+ - If you want the current behavior, explicitly use 'sslmode=verify-full'
142+ - If you want libpq compatibility now, use 'uselibpqcompat=true&sslmode=${ config . sslmode } '
143+
144+ See https://www.postgresql.org/docs/current/libpq-ssl.html for libpq SSL mode definitions.` )
145+ }
136146 break
137147 }
138148 case 'no-verify' : {
You can’t perform that action at this time.
0 commit comments