Skip to content

Commit

Permalink
Don't allow Percies to do full IP ban (#729)
Browse files Browse the repository at this point in the history
* Percy ban

* Percy can't blanket ip ban
  • Loading branch information
vck3000 authored Jan 3, 2025
1 parent e878794 commit ae59b9d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/routes/mod.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ router.post('/ban', async (req, res) => {
ipsToBan = banUser.IPAddresses;
}

// Safety mechanism. Don't allow percies to do the full IP ban.
if (userIsPercy) {
ipsToBan = banUser.lastIPAddress;
}

// Get duration for ban:
const now = new Date();
const whenMade = new Date();
Expand Down

0 comments on commit ae59b9d

Please sign in to comment.