Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
philbooth committed Jun 22, 2017
1 parent 05432ed commit 6a80585
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/server.js
Expand Up @@ -201,18 +201,14 @@ module.exports = function createServer(config, log) {
fetchRecords(ip, email, phoneNumber)
.spread(
function (ipRecord, reputation, emailRecord, ipEmailRecord, smsRecord) {
if (ipRecord.isBlocked()) {
if (ipRecord.isBlocked() && ! allowWhitelisted({ block: true }, ip, email)) {
// a blocked ip should just be ignored completely
// it's malicious, it shouldn't penalize emails or allow
// (most) escape hatches. just abort!
const result = {
return {
block: true,
retryAfter: ipRecord.retryAfter()
}

if (! allowWhitelisted(result, ip, email)) {
return result
}
}

var wantsUnblock = req.body.payload && req.body.payload.unblockCode
Expand Down

0 comments on commit 6a80585

Please sign in to comment.