Skip to content

Commit

Permalink
Issue 96restrict db (#1817)
Browse files Browse the repository at this point in the history
* Protect against brute force id lookups from below Admins

Post #1816
  • Loading branch information
Martii authored Jun 2, 2021
1 parent 2bdc57f commit ff1ccce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/moderation.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ exports.removedItemPage = function (aReq, aRes, aNext) {
options.isMod = authedUser && authedUser.isMod;
options.isAdmin = authedUser && authedUser.isAdmin;

if (!options.isMod) {
if (!options.isAdmin) {
statusCodePage(aReq, aRes, aNext, {
statusCode: 403,
statusMessage: 'This page is only accessible by moderators',
statusMessage: 'This page is only accessible by admins',
});
return;
}
Expand Down

0 comments on commit ff1ccce

Please sign in to comment.