diff --git a/controllers/story.js b/controllers/story.js index a48b011289..7f38d7cb1a 100644 --- a/controllers/story.js +++ b/controllers/story.js @@ -19,7 +19,7 @@ function hotRank(timeValue, rank) { */ var hotness; var z = Math.log(rank) / Math.log(10); - hotness = z + (timeValue / 45000000); + hotness = z + (timeValue / 172800000); return hotness; } diff --git a/controllers/user.js b/controllers/user.js index cfcd8c5430..4b41af4c45 100644 --- a/controllers/user.js +++ b/controllers/user.js @@ -94,12 +94,15 @@ exports.getEmailSignup = function(req, res) { */ exports.postEmailSignup = function(req, res, next) { - var errors = req.validationErrors(); - if (errors) { - req.flash('errors', errors); - return res.redirect('/email-signup'); - } + + req.assert('email', 'valid email required').isEmail(); + var errors = req.validationErrors(); + + if (errors) { + req.flash('errors', errors); + return res.redirect('/email-signup'); + } var possibleUserData = req.body;