elisseck / com.elisseck.civihoneypot

Simple honeypot fields for CiviCRM Contribute forms
Other
3 stars 6 forks source link

event registration page protection #11

Closed MegaphoneJon closed 4 years ago

MegaphoneJon commented 4 years ago

This extends CiviHoneypot protection to event pages.

I realize I shouldn't have converted array syntax in the same PR, and I apologize for that - but the heart of this isn't very drastic. I add two new settings (event IDs to protect, protect all events), update the JS to put the hidden fields in the correct place on event pages, and change the logic of whether to protect a page to support the new options.

elisseck commented 4 years ago

@MegaphoneJon Thanks for the contribution! Reviewing now looks good.

@tapashdatta if the fieldname doesn't have anything filled out, you can still use the extension to deny access by IP, but it won't add a "honeypot" style field to your forms without a name. As Jon mentioned, it's only viewable by robots and invisible to users. I have found that picking something generic like "name" or "url" (etc you can play with it) is more likely for a bot to latch onto and fill in, thus preventing it's submission.

Please feel free to open issues (issues tab above) in github. Maintaining this extension is on volunteer time at this point so I can't promise a timeline, but opening an issue will at least put it on my radar for that rainy day when I have time.