CMS MADE SIMPLE FORGE

CGBetterForms

 

[#11636] Configured reCaptcha doesn't stop validation of form if not checked

avatar
Created By: Dorothée DV (Nulea)
Date Submitted: Mon Nov 06 10:16:24 -0500 2017

Assigned To: Robert Campbell (calguy1000)
Version: 1.1.4
CMSMS Version: 2.2.3.1
Severity: Major
Resolution: Fixed
State: Closed
Summary:
Configured reCaptcha doesn't stop validation of form if not checked
Detailed Description:
The form displays nicely, but if the reCaptcha box is not checked, the form is
sent anyway as if it was not there.

The template contains a div with data-cgbf-captcha attribute, where the
reCaptcha box shows normally.

Did I miss a validation step?


History

Comments
avatar
Date: 2017-11-15 20:13
Posted By: Philippe Thomas (filto)

I confirm using captcha:
 tested with PHP CAPTCHA and HN CAPTCHA.

Form is correct display with captcha.
But Captcha has no validation process when form is submit.

not solve but i found this:

CGBetteForms/lib/class.CaptchaModuleProvider.php
 in function validate_captcha()

L30
if( $this->_captcha->NeedsInputField() ) $input =
\cge_param::get_string($_REQUEST,'cgbf_captcha');
       
i think it should be :

if( $this->_captcha->NeedsInputField() ) $input =
\cge_param::get_string($_REQUEST,'cgbf_input_captcha');

L31
return $this->_captcha->CheckCaptcha( $input );

wrong syntax, method does not begin with capital letter : checkCaptcha instead
of CheckCaptcha.

return $this->_captcha->checkCaptcha( $input );


Moreover, i found this  :
CGBetteForms/lib/FieldValidators/

interface.IValidation.php : declare 3 methods [get_guid, get_display_string,
validate]

abstract.Validation.php : implements Ivalidation : redeclare method [get_guid]

class.CaptchaValidatorProxy.php : extends Validation : redeclare method
[validate]

method [get_display_string] is not redeclared anywhere !


This not solve this bug report , i just hope it may help...
      
avatar
Date: 2017-11-18 10:27
Posted By: Robert Campbell (calguy1000)

Fixed in svn
      
Updates

Updated: 2018-01-30 18:00
state: Open => Closed

Updated: 2017-11-18 10:27
resolution_id: => 7