From ae279fe57f65517cac13ade727d03b9bbd39a849 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 24 Jan 2017 12:33:22 -0500 Subject: [PATCH] casting some values as int, in ensureSelfOrPrivileged middleware --- src/middleware/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/index.js b/src/middleware/index.js index 8f8f8a8002..b32b9147a4 100644 --- a/src/middleware/index.js +++ b/src/middleware/index.js @@ -79,7 +79,7 @@ middleware.ensureSelfOrPrivileged = function (req, res, next) { middleware.exposeUid prior to invoking this middleware. */ if (req.user) { - if (req.user.uid === res.locals.uid) { + if (parseInt(req.user.uid, 10) === parseInt(res.locals.uid, 10)) { return next(); }