1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/thelounge_ynh.git synced 2024-09-03 20:35:54 +02:00

[fix] Hash password

This commit is contained in:
kload 2015-08-23 11:35:22 +02:00
parent 7413bc08cf
commit dcbc382348

View file

@ -57,7 +57,7 @@ module.exports = function(options) {
var buf = new Buffer(authHeader.split(' ')[1], 'base64'); var buf = new Buffer(authHeader.split(' ')[1], 'base64');
var plain_auth = buf.toString(); var plain_auth = buf.toString();
var creds = plain_auth.split(':'); var creds = plain_auth.split(':');
manager.addUser(creds[0], creds[1]); manager.addUser(creds[0], bcrypt.hashSync(creds[1], null));
manager.loadUser(creds[0]); manager.loadUser(creds[0]);
auth.call(socket); auth.call(socket);