I am really not interested in getting error mails for crap like people
scanning to see if I have some outdated version of phpmyadmin,
roundcube, etc... the typical stuff hackers are will look for.
So within my application controller before it sends me an e-mail, I want
to search to see if it's a valid 'controller' that's being requested
before it actually sends me an error e-mail.
Thus I need something like...
if [ LIST_OF_MY_CONTROLLERS ].include?(params[:action])
I am really not interested in getting error mails for crap like people
scanning to see if I have some outdated version of phpmyadmin,
roundcube, etc... the typical stuff hackers are will look for.
So within my application controller before it sends me an e-mail, I want
to search to see if it's a valid 'controller' that's being requested
before it actually sends me an error e-mail.
Thus I need something like...
if [ LIST_OF_MY_CONTROLLERS ].include?(params[:action])
how do I get a list of my controllers?
Craig
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
I don't know of a good way to list of all your app's controllers (you
*could* search for all Constants that descend from
ApplicationController, but that seems prettttty grody). I'm *assuming*
the emails are being sent from a rescue_from or somesuch similar in your
ApplicationController... would it work for your requirements to instead
just create a catchall route and then send a 404 error/page?
Craig White wrote:
> I am really not interested in getting error mails for crap like people
> scanning to see if I have some outdated version of phpmyadmin,
> roundcube, etc... the typical stuff hackers are will look for.
>
> So within my application controller before it sends me an e-mail, I want
> to search to see if it's a valid 'controller' that's being requested
> before it actually sends me an error e-mail.
>
> Thus I need something like...
>
> if [ LIST_OF_MY_CONTROLLERS ].include?(params[:action])
>
> how do I get a list of my controllers?
>
I don't know of a good way to list of all your app's controllers (you
*could* search for all Constants that descend from
ApplicationController, but that seems prettttty grody). I'm *assuming*
the emails are being sent from a rescue_from or somesuch similar in your
ApplicationController... would it work for your requirements to instead
just create a catchall route and then send a 404 error/page?
> Craig White wrote:
> > I am really not interested in getting error mails for crap like people
> > scanning to see if I have some outdated version of phpmyadmin,
> > roundcube, etc... the typical stuff hackers are will look for.
> >
> > So within my application controller before it sends me an e-mail, I want
> > to search to see if it's a valid 'controller' that's being requested
> > before it actually sends me an error e-mail.
> >
> > Thus I need something like...
> >
> > if [ LIST_OF_MY_CONTROLLERS ].include?(params[:action])
> >
> > how do I get a list of my controllers?
> >
> I don't know of a good way to list of all your app's controllers (you
> *could* search for all Constants that descend from
> ApplicationController, but that seems prettttty grody). I'm *assuming*
> the emails are being sent from a rescue_from or somesuch similar in your
> ApplicationController... would it work for your requirements to instead
> just create a catchall route and then send a 404 error/page?
----
well I am certainly trying to deal with a 'rescue_from'.
In essence, all the various crap that people scan web servers in hopes
of finding exploitable software for are generating 404 errors...that's
to be expected.
I just don't want to see an e-mail if the URL's they are requesting
aren't a controller in my application.
Obviously I can provide a defined list of my controllers to this but
that is rather analog and rails should be able to give me a list of my
controllers or an array that I can flatten.