casting some values as int, in ensureSelfOrPrivileged middleware

v1.18.x
Julian Lam 8 years ago
parent aeed8f53f3
commit ae279fe57f

@ -79,7 +79,7 @@ middleware.ensureSelfOrPrivileged = function (req, res, next) {
middleware.exposeUid prior to invoking this middleware. middleware.exposeUid prior to invoking this middleware.
*/ */
if (req.user) { if (req.user) {
if (req.user.uid === res.locals.uid) { if (parseInt(req.user.uid, 10) === parseInt(res.locals.uid, 10)) {
return next(); return next();
} }

Loading…
Cancel
Save