Conversation
20453e2 to
e3fd6d9
Compare
e3fd6d9 to
0eb9884
Compare
| opts.ip ? 'ip':'', | ||
| opts.email ? 'email':'', | ||
| opts.uid ? 'uid':'', | ||
| ]); |
There was a problem hiding this comment.
This can cause a cardinality issue, depending on the configuration and environment where this is used. E.g. if the email pattern is 'restmail'. Do you think we'd want to know the specific ip/email/uid skipped?
There was a problem hiding this comment.
We are not passing in the IP, email or uid values themselves. Let's say all three opts were provided. The values passed in would be, ['email','ip','uid']. I don't think this would cause a cardinality problem.
There was a problem hiding this comment.
Oh I totally misread that. 👍
| rateLimit = new RateLimit( | ||
| { | ||
| rules: {}, | ||
| ignoreEmails: ['@mozilla.com$', 'foo@firefox.com'], |
There was a problem hiding this comment.
I always feel a bit nervous using regex in these types of filters. Mostly because of the chance to mess them up and allow unintended things. Should we do this based on specific domains or explict emails?
There was a problem hiding this comment.
I think this is how it worked previously. I do understand this concern though... There are some cases where it makes sense to filter by domain, and not explicitly by email address. Let me file a polish PR where we can do this by ignoreEmails and ignoreEmailDomains. For now, or rules would be very regexes would be similar to the examples above, so I'm not too worried about it.
Also, just a side note, but the more I think about how these filters work, I think using the ip filters is the way to go.
Because
This pull request
Issue that this pull request solves
Closes: FXA-11663
Checklist
Put an
xin the boxes that applyScreenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
Any other information that is important to this pull request.