mod so one can set passwords a) for pads that are in no group and b) via the web interface

This commit is contained in:
jaseg 2011-12-06 22:00:42 +01:00
parent b0976a292f
commit dc8ff69553
5 changed files with 66 additions and 29 deletions

View file

@ -202,7 +202,7 @@ exports.createGroupPad = function(groupID, padName, text, callback)
}
});
},
//ensure pad does not exists
//ensure pad does not exist
function (callback)
{
padManager.doesPadExists(padID, function(err, exists)
@ -278,8 +278,7 @@ function randomString(len)
var randomstring = '';
for (var i = 0; i < len; i++)
{
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum, rnum + 1);
randomstring += chars[Math.floor(Math.random() * chars.length)];
}
return randomstring;
}