[LRUG] Exception notifier and bots

Thomas R. Koll tomk32 at gmx.de
Thu Jul 31 03:34:37 PDT 2008


What exception?
ActionController::InvalidAuthenticityToken is the most common for
me but I don't bother the mails so the following tips are just theory:

The exception is raised in  
ActionController::RequestForgeryProtection.verify_authenticity_token
so you might want to overwrite it and for example redirect to  
something else.

An alternative is to skip the filter for your create (or update)  
method and
in those methods do like

skip_before_filter :verify_authenticity_token, :only => :create
def create
   render :new and return unless verified_request?
   # ...
end

ciao, tom


Am 31.07.2008 um 12:16 schrieb Andrea (Q):

> Hi,
>
> everyday i receive a lot of exceptions but the most of are from bot,  
> there is a way to manage that situation? i don't want to receive the  
> exceptions raised by a bot. I think that i could try to read the  
> header of the request and the HTTP_USER_AGENT field but maybe there  
> is something better.



--
Thomas R. "TomK32" Koll || http://tomk32.de || http://ananasblau.com
just a geek trying to change the world
Skype: TomK32 || Mail: tomk32 at gmx.de




More information about the Chat mailing list