diff --git a/lib/client.js b/lib/client.js index f0a374d..18f2587 100644 --- a/lib/client.js +++ b/lib/client.js @@ -84,7 +84,7 @@ Client.prototype.connect = function(callback) { //password request handling con.on('authenticationMD5Password', checkPgPass(function(msg) { var inner = Client.md5(self.password + self.user); - var outer = Client.md5(inner + msg.salt.toString('binary')); + var outer = Client.md5(Buffer.concat([new Buffer(inner), msg.salt])); var md5password = "md5" + outer; con.password(md5password); }));