Forgot password token changed to hex instead of base64 to avoid having slashes in the url
This commit is contained in:
@ -36,8 +36,8 @@ exports.postForgot = function(req, res, next) {
|
||||
|
||||
async.waterfall([
|
||||
function(done) {
|
||||
crypto.randomBytes(32, function(err, buf) {
|
||||
var token = buf.toString('base64');
|
||||
crypto.randomBytes(20, function(err, buf) {
|
||||
var token = buf.toString('hex');
|
||||
done(err, token);
|
||||
});
|
||||
},
|
||||
|
Reference in New Issue
Block a user