Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
akulsharma1 committed Oct 23, 2023
1 parent 38b51fc commit 7b9bd2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/profile/profile-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" });
}

Expand Down

0 comments on commit 7b9bd2a

Please sign in to comment.