node-postgres icon indicating copy to clipboard operation
node-postgres copied to clipboard

Add missing _checkPgPass on _handleAuthSASLContinue

Open cesco69 opened this issue 1 year ago • 4 comments

cesco69 avatar Jun 10 '24 09:06 cesco69

Why does this one need _checkPgPass on top of _handleAuthSASL’s?

charmander avatar Jun 10 '24 19:06 charmander

Why does this one need _checkPgPass on top of _handleAuthSASL’s?

this.password can be a function and _checkPgPass handle this case, if this.password is a function, call it and set this.password as string

cesco69 avatar Jun 11 '24 07:06 cesco69

Does _handleAuthSASL not already take care of that? Can you give an example of a use of the library that behaves differently before and after this change?

charmander avatar Jun 14 '24 12:06 charmander

yeah I need tests (preferably one that failed before this code was added) or this can't be merged. As an aside, I am thinking of removing built in pg-pass support & rather making that something the user does their own self before calling the client rather than reading a file from disk on every client connection. That would obvs be a breaking change so not until v 9.x

brianc avatar Jun 18 '24 21:06 brianc