From 6fddc566f09cf6b5919638a6f69c251e20437b75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martynas=20Kunig=C4=97lis?= Date: Wed, 27 Apr 2016 21:52:28 +0300 Subject: [PATCH] Use Buffer concatenation for binary data instead of binary strings. Fixes Node.js v6.0.0 breakage. (#1001) --- lib/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }));