Skip to content

Commit 6fddc56

Browse files
ignitenet-martynasbrianc
authored andcommitted
Use Buffer concatenation for binary data instead of binary strings. Fixes Node.js v6.0.0 breakage. (brianc#1001)
1 parent 3433ed9 commit 6fddc56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/client.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Client.prototype.connect = function(callback) {
8484
//password request handling
8585
con.on('authenticationMD5Password', checkPgPass(function(msg) {
8686
var inner = Client.md5(self.password + self.user);
87-
var outer = Client.md5(inner + msg.salt.toString('binary'));
87+
var outer = Client.md5(Buffer.concat([new Buffer(inner), msg.salt]));
8888
var md5password = "md5" + outer;
8989
con.password(md5password);
9090
}));

0 commit comments

Comments
 (0)