Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-20294

Can't use HTTPS protocol for target feed

    XMLWordPrintable

Details

    Description

      When you specify a secure URL (https) in the providerUri parameter in wsproviders.ini.append.php, the connection to the target feed does not work. We have the following error in the status check page:

      0 - php_network_getaddresses: getaddrinfo failed: Name or service not known

      After debugging the code, we found a bug in the file extension/ezcontentstaging/classes/private/ezrestclient.php

      When the protocol is https, the script goes into this condition:

      extension/ezcontentstaging/classes/private/ezrestclient.php
                  if ( $this->Protocol == 'https' )
                  {
                      $connectServer = 'ssl://' . $connectServer;
                  }
      

      The following code will then not work:

      extension/ezcontentstaging/classes/private/ezrestclient.php
                  /// @todo add ssl support with raw sockets
                  $fp = stream_socket_client(
                      "tcp://" . $connectServer . ":" . $connectPort,
                      $this->errorNumber,
                      $this->errorString,
                      $this->Timeout != 0 ? $this->Timeout : ini_get( "default_socket_timeout" )
                  );
      

      The stream_socket_client function will try to connect to a server address that looks like this: tcp://ssl://....

      Attachments

        Activity

          People

            Unassigned Unassigned
            ly ly
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 7 hours, 40 minutes
                1d 7h 40m