Google Maps SSL Error utilizing drupal_http_query

Created on 17 October 2017, over 6 years ago
Updated 16 June 2023, about 1 year ago

Utilizing drupal_http_request produces this error:

Exception: HTTP request to google API failed.\nCode: 0\nError: Error opening socket ssl://maps.googleapis.com:443 in geocoder_google() (line 109 of /Users/saltman/Documents/work/sentera/public_html/sites/all/modules/geocoder/plugins/geocoder_handler/google.inc).

Had to update to utilize cURL and adjust the response variable. Patch incoming.

πŸ› Bug report
Status

Closed: works as designed

Version

1.7

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mawint

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.

  • πŸ‡ΈπŸ‡°Slovakia poker10

    Thanks for working on this! Is this issue still relevant? I tried to test it on a site with SSL enabled and the request to maps.googleapis.com from geocoder_google was successfull without any errors.

    All patches here (#2, #5, #6) are doing this:

    +    CURLOPT_SSL_VERIFYHOST => FALSE,
    +    CURLOPT_SSL_VERIFYPEER => FALSE
    

    This will effectively disable protection against various attacks like man-in-the-middle and allows the communication to be insecure (see: https://curl.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html). I think it is not a good idea to commit a change like this.

    The Error opening socket message could mean that the PHP has no openSSL support, has outdated CA certificates, or similar. If this is the case, I recommend to use this contrib module: https://www.drupal.org/project/alt_http_client β†’ to disable the SSL verification for the specific host. But introducing this change for all Geocoder users is not possible.

    I do not think we can do more here, unless there will be a clear steps to reproduce the problem on 7.x-1.7 and on server with openSSL correctly working. The communication to Google API must be over SSL, so closing as Works as designed. Feel free to reopen this in case there will be some more information. Thanks!

Production build 0.69.0 2024