Problem/Motivation

The currently used version is an unknown version that is not a official release from Google. It looks a bit like https://github.com/google/recaptcha/tree/1.0.0/php, but there are unknown difference.

Proposed resolution

Upgrade to latest version, see https://github.com/google/recaptcha/tree/1.1.1

Remaining tasks

  1. Find out why the used version is not the 1.0.0
  2. Upgrade to 1.1.1

User interface changes

None.

API changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hass’s picture

Status: Active » Needs review
FileSize
66.54 KB

Does anyone has an idea why the files includes in the .info file do not allow me to use the class directly or with other words - how can I use the classes directly? I'd like to get rid of the require_once().

What is the best name for the include folder?

This is the Google reCAPTCHA library v1.1.1 and this one require PHP 5.3.2 per composer.json.

Status: Needs review » Needs work

The last submitted patch, 1: Issue-2472811-by-hass-Upgrade-lib-to-latest-version.patch, failed testing.

diolan’s picture

@haas,
As far as I remember the initial version was 1.0.0. Then the source was changed to fix the issue with allow_url_fopen=0 in php.ini (https://www.drupal.org/node/2404083).

hass’s picture

Thanks for this detail! Looks like the new library has not fixed this, too.

Warning: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in ReCaptcha\RequestMethod\Post->submit() (Zeile 68 von sites\all\modules\contrib\recaptcha\includes\src\ReCaptcha\RequestMethod\Post.php).
Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify): failed to open stream: no suitable wrapper could be found in ReCaptcha\RequestMethod\Post->submit() (Zeile 68 von sites\all\modules\contrib\recaptcha\includes\src\ReCaptcha\RequestMethod\Post.php).
hass’s picture

Looks like there is an open issue about this already https://github.com/google/recaptcha/pull/39 . We could commit the code as is and wait for the feature or hack the lib. I tend to wait and also add a hook_requirements() that checks if everything is available we need.

hass’s picture

Status: Needs work » Fixed

  • hass committed 659214f on
    Issue #2472811 by hass: Upgrade library to latest version
    

  • hass committed 659214f on 8.x-2.x
    Issue #2472811 by hass: Upgrade library to latest version
    

  • hass committed 659214f on 6.x-2.x
    Issue #2472811 by hass: Upgrade library to latest version
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.