Skip to content

Commit

Permalink
Since defensio needs some training, lets try another spam strategy th…
Browse files Browse the repository at this point in the history
…at works for Paul Battley
  • Loading branch information
lazyatom committed Aug 22, 2008
1 parent d3ee2f2 commit dba307f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/vanilla/dynasnips/comments.rb
Expand Up @@ -37,6 +37,7 @@ def post(*args)
if comment_is_spam?(comment)
"Sorry - your comment looks like spam, according to Defensio :("
else
return "No spam today, thanks anyway" unless app.request.params[:human] == 'human'
Soup << comment.merge({
:name => "#{snip_name}-comment-#{existing_comments.length + 1}",
:commenting_on => snip_name,
Expand Down Expand Up @@ -90,6 +91,7 @@ def comment_is_spam?(comment)
<label>Email: <input type="text" name="email"></input></label>
<label>Website: <input type="text" name="website"></input></label>
<textarea name="content"></textarea>
<label>Type 'human' if you are one: <input type="text" name="human"></input></label>
<button>Submit</button>
</form>
}
Expand Down

0 comments on commit dba307f

Please sign in to comment.