mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 02:25:55 +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.
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user