rocklobster-in / contact-form-7

Contact Form 7 - Just another contact form plugin for WordPress.
Other
287 stars 140 forks source link

wpcf7_use_recaptcha_net doesn't work as expected #1430

Closed Devstellar closed 4 months ago

Devstellar commented 5 months ago

If www.google.com is blocked, the alternative is to use www.recaptcha.net. In the plugin this is documented in: https://contactform7.com/faq-about-recaptcha-v3/#can-I-use-www-recaptcha-net

However this doesn't work properly. The problem seems to be in modules/recaptcha/service.php. Line 134 is hardcoded to www.google.com: $endpoint = 'https://www.google.com/recaptcha/api/siteverify';

Manually chaging line to this, fixed our problem: $endpoint = 'https://www.recaptcha.net/recaptcha/api/siteverify';

But I think a proper solution should be implemented similar to the one in recaptcha.php:

    if ( apply_filters( 'wpcf7_use_recaptcha_net', false ) ) {
        $url = 'https://www.recaptcha.net/recaptcha/api.js';
    }
takayukister commented 4 months ago

You are right. Apparently I overlooked this point from FAQ:

After that, apply the same to everywhere else that uses "www.google.com/recaptcha/" on your site.