From 0010cfb6ad8f1788968adbb53747ab0b404a93a1 Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Mon, 20 Jun 2011 09:16:15 +0200 Subject: [PATCH] default reaction to deny --- lib/rack/protection/base.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/rack/protection/base.rb b/lib/rack/protection/base.rb index 9eb71c6..5b00826 100644 --- a/lib/rack/protection/base.rb +++ b/lib/rack/protection/base.rb @@ -85,13 +85,11 @@ def random_string(secure = defined? SecureRandom) random_string false end - def default_reaction(env) - fail "no default reaction given for #{self.class}" - end - def encrypt(value) options[:encryptor].hexdigest value.to_s end + + alias default_reaction deny end end end