mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 10:06:13 +01:00
casting some values as int, in ensureSelfOrPrivileged middleware
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user