Skip to content

Commit

Permalink
Fix alt check (pokemontrades#663)
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowPhoenix authored Jan 3, 2021
1 parent facbc88 commit 1dec269
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/controllers/FlairController.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ module.exports = {
var flagged = _.reject(flairs.fcs, Flairs.validFC);
var ipAddress = req.headers['x-forwarded-for'] || req.ip;
// Get IP matches with banned users
var events_with_ip = await Event.find({content: {contains: ipAddress}, user: {not: req.user.name}});
var events_with_ip = await Event.find({content: RegExp('IP: '+ipAddress.replace(/\./,'\\.')+'$'), user: {not: req.user.name}});

var matching_ip_usernames = _.uniq(_.map(events_with_ip, 'user'));
var matching_ip_users = await User.find({name: matching_ip_usernames});
Expand Down

0 comments on commit 1dec269

Please sign in to comment.