Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/honeypot-captcha.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def honeypot_style_class
end

def protect_from_spam
head :ok if honeypot_fields.any? { |f,l| !params[f].blank? }
head :ok if honeypot_fields.any? { |f,l| !params[f].blank? || params[f].to_s.length > 0 }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this could be simplified to the one string value we allow:

Suggested change
head :ok if honeypot_fields.any? { |f,l| !params[f].blank? || params[f].to_s.length > 0 }
head :ok if honeypot_fields.any? { |f, _| params[f].to_s != "" }

end

def self.included(base) # :nodoc:
Expand Down