Karmabunny / sprout3

SproutCMS: content management and framework
http://getsproutcms.com
GNU General Public License v2.0
24 stars 3 forks source link

Feat/security honeypot helpers #95

Closed jamiemonksuk closed 10 months ago

jamiemonksuk commented 11 months ago

Honeypot field name can optionally be overridden by a config honeypot.field_name if desired

aitken85 commented 11 months ago

Security::honeypotSet() Should probably use a return statement instead of directly echoing to match almost all our other sprout3 helpers. Other than that, all good.

aitken85 commented 11 months ago

@gwillz Happy to go ahead to merge this?

gwillz commented 11 months ago

Yeah I reckon so, it's tried and tested.

If I were being pedantic, I don't enjoy that honeypotCheckOrDie() doesn't actually die - it throws.

To be clear I don't like die() either (I wish it would die) and I prefer exceptions any day. It's only the name is quite misleading.

gwillz commented 11 months ago

Actually, the prefixing honeypot really screams that this should be in a Honeypot helper.

gwillz commented 10 months ago

OK so this is all in a new helper, also added a twig helper. Everyone happy?

jamiemonksuk commented 10 months ago

I like the don't tell anyone commit