From 1f56dcc645ebfb7e45804deb18d0d4af11126781 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Tue, 28 Jun 2016 19:01:29 +0200 Subject: [PATCH] replace WHITELIST terminology with SAFELIST --- lib/travis/api/attack.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/travis/api/attack.rb b/lib/travis/api/attack.rb index d210b633..5b945eca 100644 --- a/lib/travis/api/attack.rb +++ b/lib/travis/api/attack.rb @@ -25,7 +25,7 @@ class Rack::Attack end end - POST_WHITELISTED = [ + POST_SAFELIST = [ "/auth/handshake", "/auth/post_message", "/auth/post_message/iframe" @@ -61,7 +61,7 @@ class Rack::Attack # Ban after: 10 POST requests within 30 seconds blacklist('spamming with POST requests') do |request| Rack::Attack::Allow2Ban.filter(request.identifier, maxretry: 10, findtime: 30.seconds, bantime: bantime(1.hour)) do - request.post? and not POST_WHITELISTED.include? request.path + request.post? and not POST_SAFELIST.include? request.path end end