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([
|
async.waterfall([
|
||||||
function(done) {
|
function(done) {
|
||||||
crypto.randomBytes(32, function(err, buf) {
|
crypto.randomBytes(20, function(err, buf) {
|
||||||
var token = buf.toString('base64');
|
var token = buf.toString('hex');
|
||||||
done(err, token);
|
done(err, token);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user