From 7b9bd2a84f6d0b855fe85a4aa35b037793cbaa94 Mon Sep 17 00:00:00 2001 From: Akul Sharma Date: Sun, 22 Oct 2023 22:34:00 -0500 Subject: [PATCH] bug fixes --- src/services/profile/profile-router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/profile/profile-router.ts b/src/services/profile/profile-router.ts index e869da1b..02b9f181 100644 --- a/src/services/profile/profile-router.ts +++ b/src/services/profile/profile-router.ts @@ -170,7 +170,7 @@ profileRouter.get("/id/:USERID", strongJwtVerification, async (req: Request, res const payload: JwtPayload = res.locals.payload as JwtPayload; // Trying to perform elevated operation (getting someone else's profile without elevated perms) - if (userId != payload.id && !hasElevatedPerms(payload)) { + if (!hasElevatedPerms(payload)) { return res.status(Constants.FORBIDDEN).send({ error: "Forbidden" }); }