-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for Userforms 3.x #2
Comments
Hi @tazzydemon thanks for the issue report. This seems like it might actually be a bug with Userforms bypassing the validation method? Although your suggestion works around the issue you've highlighted it bypasses |
I was about to deploy as it seemed close to stable but the latest change to UserForms has chucked the baby out with the bathwater so to speak. I think that my modifications are still valid - the problem now is that the entire method of validation may (probably will) need a rework so I'm hanging fire. |
Is Honeypot still not working in the latest Userforms? |
Well my one is if you want a copy!
From: James Cocker <[email protected]>
Sent: Wednesday, 28 March 2018 11:00 PM
To: studiobonito/silverstripe-spamprotection-honeypot <[email protected]>
Cc: tazzydemon <[email protected]>; Mention <[email protected]>
Subject: Re: [studiobonito/silverstripe-spamprotection-honeypot] Fix for Userforms 3.x (#2)
Is Honeypot still not working in the latest Userforms?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#2 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/ABeowr-6eGGvFZQDhFEY51DHq4W9EqMJks5ti18mgaJpZM4GuZ5K> . <https://github.com/notifications/beacon/ABeowice_T_jrz5E3RpBP40zhfOtsZPcks5ti18mgaJpZM4GuZ5K.gif>
…---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
|
Please! :) Can't seem to see a fork in your account. |
Something has changed in the object flow in the current Framework 3.2 / UserForms 3.x combination.
$this inside the HoneypotField object during validation now contains no references to the current controller. $this->value is null and before that this line (26) baulks:
$timestamp = $this->getForm()->getController()->getRequest()->postVar($this->getName() . '_Timestamp');
I propose a change thus:
L42 if (!empty($honeypot) || ($timeLimit > 0 && ($timestamp + $timeLimit) > time())) {
This change makes UserForms 3 work. YMMV. Note that any error messages displayed are not the ones created here. This is down to Userforms and I will try to fix it.
The text was updated successfully, but these errors were encountered: