Use Buffer concatenation for binary data instead of binary strings. Fixes Node.js v6.0.0 breakage. (#1001)
This commit is contained in:
parent
3433ed9673
commit
6fddc566f0
@ -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);
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user