Welcome Guest, Not a member yet? Register   Sign In
recaptcha_2.0.x demo always returns true
#1

[eluser]Unknown[/eluser]
Hello,

I'm hoping someone out there can help out me, a noob. I have recaptcha_2.0.x installed in my CI app as a module. I'm using the the out-of-box recaptchademo just to get it working. The captcha displays but when my attempt to match captcha is submitted, it returns true (i.e., Yay! You got it right!) even when I enter intentional mismatches. I would provide more code, but it's all pretty much stock code, beyond me having added the following:

Code:
'public'=>'8fRTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXF4fgT',
  'private'=>'4TdfjXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXBlah!',
...
to config/recaptcha.php config file and
Code:
<?= form_open('recaptcha/recaptchademo') ?>
...
<?= form_close() ?>
to ../modules/recaptcha/views/recaptcha_demo.php, which takes into account that I'd using MX. I'm pretty sure it's something obvious but I can't find anyone who has posted a similar issue.

Here's a dump of the log just after I submit a recaptcha attempt, which looks clean to me:
Code:
...
DEBUG - 2012-02-24 12:26:06 --> File loaded: application/modules/recaptcha/config/recaptcha.php
DEBUG - 2012-02-24 12:26:06 --> File loaded: application/modules/recaptcha/libraries/recaptcha.php
DEBUG - 2012-02-24 12:26:06 --> File loaded: application/modules/recaptcha/config/recaptcha.php
DEBUG - 2012-02-24 12:26:06 --> File loaded: application/modules/recaptcha/language/english/recaptcha_lang.php
DEBUG - 2012-02-24 12:26:06 --> File loaded: application/modules/recaptcha/config/form_validation.php
DEBUG - 2012-02-24 12:26:06 --> Helper loaded: form_helper
DEBUG - 2012-02-24 12:26:06 --> Form Validation Class Initialized
DEBUG - 2012-02-24 12:26:06 --> Language file loaded: language/english/form_validation_lang.php
DEBUG - 2012-02-24 12:26:06 --> File loaded: application/modules/recaptcha/views/recaptcha_demo.php
DEBUG - 2012-02-24 12:26:06 --> Final output sent to browser
DEBUG - 2012-02-24 12:26:06 --> Total execution time: 0.0661
DEBUG - 2012-02-24 12:26:18 --> Config Class Initialized
DEBUG - 2012-02-24 12:26:18 --> Hooks Class Initialized
DEBUG - 2012-02-24 12:26:18 --> Utf8 Class Initialized
DEBUG - 2012-02-24 12:26:18 --> UTF-8 Support Enabled
DEBUG - 2012-02-24 12:26:18 --> URI Class Initialized
DEBUG - 2012-02-24 12:26:18 --> Router Class Initialized
DEBUG - 2012-02-24 12:26:18 --> Output Class Initialized
DEBUG - 2012-02-24 12:26:18 --> Security Class Initialized
DEBUG - 2012-02-24 12:26:18 --> Input Class Initialized
DEBUG - 2012-02-24 12:26:18 --> Global POST and COOKIE data sanitized
DEBUG - 2012-02-24 12:26:18 --> Language Class Initialized
DEBUG - 2012-02-24 12:26:18 --> Language Class Initialized
DEBUG - 2012-02-24 12:26:18 --> Config Class Initialized
DEBUG - 2012-02-24 12:26:18 --> Loader Class Initialized
DEBUG - 2012-02-24 12:26:18 --> Database Driver Class Initialized
DEBUG - 2012-02-24 12:26:18 --> Session Class Initialized
DEBUG - 2012-02-24 12:26:18 --> Helper loaded: string_helper
DEBUG - 2012-02-24 12:26:18 --> Session routines successfully run
DEBUG - 2012-02-24 12:26:18 --> User Agent Class Initialized
DEBUG - 2012-02-24 12:26:18 --> Template Class Initialized
DEBUG - 2012-02-24 12:26:18 --> Controller Class Initialized
DEBUG - 2012-02-24 12:26:18 --> Recaptchademo MX_Controller Initialized
DEBUG - 2012-02-24 12:26:18 --> Loader Class Initialized
DEBUG - 2012-02-24 12:26:18 --> File loaded: application/modules/auth/libraries/Ion_auth.php
DEBUG - 2012-02-24 12:26:18 --> File loaded: application/modules/auth/config/ion_auth.php
DEBUG - 2012-02-24 12:26:18 --> Email Class Initialized
DEBUG - 2012-02-24 12:26:18 --> File loaded: application/modules/auth/language/english/ion_auth_lang.php
DEBUG - 2012-02-24 12:26:18 --> Model Class Initialized
DEBUG - 2012-02-24 12:26:18 --> File loaded: application/modules/auth/models/ion_auth_model.php
DEBUG - 2012-02-24 12:26:18 --> Model Class Initialized
DEBUG - 2012-02-24 12:26:18 --> File loaded: application/modules/auth/config/ion_auth.php
DEBUG - 2012-02-24 12:26:18 --> Helper loaded: cookie_helper
DEBUG - 2012-02-24 12:26:18 --> Helper loaded: date_helper
DEBUG - 2012-02-24 12:26:18 --> File loaded: application/modules/recaptcha/config/recaptcha.php
DEBUG - 2012-02-24 12:26:18 --> File loaded: application/modules/recaptcha/libraries/recaptcha.php
DEBUG - 2012-02-24 12:26:18 --> File loaded: application/modules/recaptcha/config/recaptcha.php
DEBUG - 2012-02-24 12:26:18 --> File loaded: application/modules/recaptcha/language/english/recaptcha_lang.php
DEBUG - 2012-02-24 12:26:18 --> File loaded: application/modules/recaptcha/config/form_validation.php
DEBUG - 2012-02-24 12:26:18 --> Helper loaded: form_helper
DEBUG - 2012-02-24 12:26:18 --> Form Validation Class Initialized
DEBUG - 2012-02-24 12:26:18 --> Language file loaded: language/english/form_validation_lang.php
DEBUG - 2012-02-24 12:26:18 --> File loaded: application/modules/recaptcha/views/recaptcha_demo.php
DEBUG - 2012-02-24 12:26:18 --> Final output sent to browser
DEBUG - 2012-02-24 12:26:18 --> Total execution time: 0.0940

Also, used var_dump:

Code:
...
    if ($this->form_validation->run())
    {
        var_dump($this->input->post(NULL, FALSE));
      $this->load->view('recaptcha_demo',array('recaptcha'=>'Yay! You got it right!'));
    }
    else
    {
...
that returned:
Code:
array(3) { ["recaptcha_challenge_field"]=> string(164) "long-string-blaaaaaaaaaaaaaaaaaaaaaaaaaaaa-substituted-for-real-string" ["recaptcha_response_field"]=> string(11) "my garbage_response" ["recaptchasubmit"]=> string(15) "Check Recaptcha" }
Yay! You got it right!

I appreciate the help in advance!

~blusea




Theme © iAndrew 2016 - Forum software by © MyBB