Proxy settings are not used

Created on 15 September 2020, over 4 years ago
Updated 8 August 2024, 8 months ago

Problem/Motivation

When validating captcha response, the request method is not specified and the library will use its own request method to connect. It works for most of the environments but it will fail if the server can connect to the outside world through a proxy.

Proposed resolution

The attached patch will detect if recaptcha module is installed and will use the request method from there. It isn't the best way, although duplicating the same class is better either, so I think something should be decided here.

Remaining tasks

Decide if the current idea is a good way of solving it. It doesn't make recaptcha a dependency, but it will be required if proxy support is needed for recaptcha_v3.

πŸ“Œ Task
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ͺπŸ‡ͺEstonia rang501 Viljandi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update almost 2 years ago
    1 pass
  • πŸ‡ΊπŸ‡¦Ukraine nginex

    Reroll for latest 8.x-1.x

  • πŸ‡¨πŸ‡¦Canada noah

    It looks like changes made to the reCAPTCHA module here have broken this patch:

    https://www.drupal.org/node/3408409 β†’

    Now that \GuzzleHttp\ClientInterface is injected, \Drupal\recaptcha\ReCaptcha\RequestMethod\Drupal8Post() expects it to be there. Because the previous patch doesn't provide it, we were seeing a white screen due to β€œToo few arguments to function Drupal\recaptcha\ReCaptcha\RequestMethod\Drupal8Post::__construct()…”.

    Attached is an updated patch that should resolve this issue. I've also updated the version, though it appears that, at least for now, the patch will apply to either 1.x or 2.x.

Production build 0.71.5 2024