mad.ly rails, jquery, flash, etc    about »

We're looking for senior developer. More Info

Posted by
Geoff Buesing

Posted on
1 May 2009 @ 3pm

Tagged
rails, ruby

Honeypot filter as a Rack middleware

Our site’s suggestion box got hammered by a spambot recently, so I created this simple Rack middleware to protect our app from any requests that include a honeypot field:

Been using this in production for a few days; seems to work well. Interested in hearing comments on this technique.

Thanks to Zach Zolton for the idea, and to Trevor Turk for adding documentation.


3 Comments

Posted by
almost effortless » Weekly Digest, 5-3-09
3 May 2009 @ 5pm

[...] Honeypot filter as a Rack middleware Our site’s suggestion box got hammered by a spambot recently, so I created this simple Rack middleware to protect our app from any requests that include a honeypot field. [...]


Posted by
Anko Painting
4 May 2009 @ 4pm

Could the line;
<div class=”something_unique_to_your_app”>

be changed to
<div class=”<%= HONEYPOT_FIELD_NAME %>”>

to make it more DRY?

(third time’s a charm)


Posted by
David
20 December 2009 @ 3pm

Would it make sense to block the ip address once the spammer tried to post to the honeypot field? or would that be too harsh?


Leave a Comment