?
avatar flashfs
flashfs
14 Mar 2017

Steps to reproduce the issue

Use McAfee Web Gateway proxy behind the server. Do not configure Joomla's proxy settings, but do configure Apache to access external addresses throught the proxy. Try to update Joomla using /administrator/index.php?option=com_joomlaupdate.

Expected result

Update is found and clicking on Install works as planned.

Actual result

Update is found, but it isn't possible to install it.
The field Package's URL is: Notice: Undefined property: JUpdate::$downloadurl in /var/www/html/administrator/components/com_joomlaupdate/views/default/tmpl/default.php on line 104 Notice: Trying to get property of non-object in /var/www/html/administrator/components/com_joomlaupdate/views/default/tmpl/default.php on line 104
And the field Additional info: Notice: Trying to get property of non-object in /var/www/html/administrator/components/com_joomlaupdate/views/default/tmpl/default.php on line 114

System information (as much as possible)

Joomla 3.5.1
PHP 5.5
cURL 7.19.7
McAfee Web Gateway 7.6 acting as a proxy behind the server

Additional comments

I've managed to get to the bottom of it.
The XML from https://update.joomla.org/core/sts/extension_sts.xml is not parsing.

The file /libraries/joomla/http/transport/curl.php, at the line 248:

$response = explode("\r\n\r\n", $content, 2 + $redirects);

Echoing the $redirects variable will print "0".
Now look when I echoed $response just after that line:

array(2) {
  [0]=>
  string(35) "HTTP/1.0 200 Connection established"
  [1]=>
  string(5575) "HTTP/1.1 200 OK
Via: 1.1 10.7.XXX.XX (McAfee Web Gateway 7.6.X.X.X.XXXXX)
Date: Tue, 14 Mar 2017 16:44:58 GMT
Server: NetDNA-cache/2.2
X-Cache: EXPIRED
Connection: Keep-Alive
Content-Type: text/xml
Accept-Ranges: bytes
Cache-Control: max-age=600
Last-Modified: Wed, 18 Jan 2017 19:54:34 GMT
Content-Length: 5250

<?xml version="1.0" ?>
all the correct xml goes here
"
}

Then I try changing 2 to 3:

$response = explode("\r\n\r\n", $content, 3 + $redirects);

Echoing $response:

array(3) {
  [0]=>
  string(35) "HTTP/1.0 200 Connection established"
  [1]=>
  string(317) "HTTP/1.1 200 OK
Via: 1.1 10.7.XXX.XX (McAfee Web Gateway 7.6.X.X.X.XXXXX)
Date: Tue, 14 Mar 2017 16:48:32 GMT
Server: NetDNA-cache/2.2
X-Cache: HIT
Connection: Keep-Alive
Content-Type: text/xml
Accept-Ranges: bytes
Cache-Control: max-age=600
Last-Modified: Wed, 18 Jan 2017 19:54:34 GMT
Content-Length: 5250"
  [2]=>
  string(5250) "<?xml version="1.0" ?>
all the xml content goes here
"
}

Now there are two array items with headers and the last one is only the body.
With this modification Joomla updater manages to parse the XML correctly and fills the Package URL and Additional info with the right values.

avatar flashfs flashfs - open - 14 Mar 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Mar 2017
avatar mbabker
mbabker - comment - 14 Mar 2017

This is fixed in 3.7. #13221

avatar mbabker mbabker - change - 14 Mar 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-03-14 17:06:46
Closed_By mbabker
avatar mbabker mbabker - close - 14 Mar 2017

Add a Comment

Login with GitHub to post a comment