summarylogtreecommitdiffstats
path: root/fix-postgres.patch
blob: fa8d8c5d9ed352bf577d5f0c9711b27f0a7870aa (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/src/node_modules/pg/lib/client.js	2017-12-17 20:38:14.495243336 +0100
+++ b/src/node_modules/pg/lib/client.js	2017-12-17 20:39:12.917479150 +0100
@@ -84,7 +84,7 @@
   //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);
   }));