HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

No Captcha ReCaptcha 0.1.6b breaks registration of V 2.2

phreakphreak MVP
edited August 2015 in Feedback

Hey all and @x00,

I just testet "No Captcha ReCaptcha" under a recent version of V 2.2 and it seems to break the registration page. It blank the whole page and removes the master template it seems. Only the registration forms appeas stripped of the HEAD and every other code in the HTML.

Someone can help me me what might have changed from 2.1 to 2.2 so that the plugin is able to corrupt the rendering?

Thanx, phreak

  • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
  • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
Tagged:

Comments

  • edited August 2015

    What changed from Vanilla 2.1 to 2.2 to cause the plugin to break is probably related to this: https://github.com/vanilla/vanilla/commit/4b359fc1b09da99f870c5c5f0873b667b7e31697

    The register CAPTCHA view now uses the Gdn_Form->captcha() method: https://github.com/vanilla/vanilla/blob/master/library/core/class.form.php

    Add Pages to Vanilla with the Basic Pages app

  • To be honest it would be probably be best doing a pull request, rather than using a plugin. If anyone wants to do it.

    The http://www.google.com/recaptcha/api/verify api has been superseded by https://www.google.com/recaptcha/api/siteverifyapi.

    So it need to be updated in the core. My solution was more of a workaround.

    grep is your friend.

  • I agree that the reCAPTCHA in Vanilla should be updated to the new one.

    Add Pages to Vanilla with the Basic Pages app

  • Thank you @x00 for the help i could figure it out with your codepiece. :)

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • co_smoco_smo New
    edited March 2017

    Hello, I am also getting the "Invalid keys" error with Vanilla 2.3. I tried the code above and included it this way

    `if(!function_exists('recaptcha_get_html')){

    function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
    {
    if ($pubkey == null || $pubkey == '') {
    echo (T('ToUseRecaptcha', "To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin"));
    return;
    }
    if ($use_ssl) {
    $server = RECAPTCHA_API_SECURE_SERVER;
    } else {
    $server = RECAPTCHA_API_SERVER;
    }

        $errorpart = "";
        if ($error) {
           $errorpart = "&error=" . $error;
        }
        return '<script type="text/javascript" src="'. $server . '/challenge?k=' . $pubkey . $errorpart . '"></script>
    <noscript>
        <iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br/>
        <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
        <input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
    </noscript>';
    

    }
    }`

    but it did't help. As I am a newbie, maybe I just put it in the wrong place?

    Thanks a lot for your help, I very much appreciate your help for not-that-smart people :)

  • I just updated to 2.4 beta, the error is gone. Kudos to the developers!

  • x00x00 MVP
    edited April 2017

    this is in the core now. no need for thsi plugin.

    grep is your friend.

Sign In or Register to comment.