[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [dip/master] Support new Rack::Attack



commit fa94c7b46953d60e88862d6323a5c89ce8c88b64
Author: Bastian Blank <waldi@xxxxxxxxxx>
Date:   Sun Nov 24 19:47:27 2019 +0100

    Support new Rack::Attack
---
 roles/gitlab/templates/rack_attack.rb.j2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/roles/gitlab/templates/rack_attack.rb.j2 b/roles/gitlab/templates/rack_attack.rb.j2
index d4dec95..b48bf5e 100644
--- a/roles/gitlab/templates/rack_attack.rb.j2
+++ b/roles/gitlab/templates/rack_attack.rb.j2
@@ -28,7 +28,7 @@ unless Rails.env.test? || !rack_attack_enabled
   end
 end
 
-Rack::Attack.blacklist("block from ip blacklist") do |req|
+Rack::Attack.blocklist("block from ip blacklist") do |req|
   ::Gitlab::Redis::SharedState.with do |redis|
     begin
       ip = IPAddr.new(req.ip)
@@ -58,7 +58,7 @@ Rack::Attack.blacklist("block from ip blacklist") do |req|
   end
 end
 
-Rack::Attack.blacklisted_response = lambda do |env|
+Rack::Attack.blocklisted_response = lambda do |env|
   reason = env['RACK_ATTACK_BLACKLIST_REASON']
   if reason != ''
     text = "Forbidden, #{reason}\n"



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits