J3 Issue ?
avatar jonathan00
jonathan00
14 Dec 2016

Steps to reproduce the issue

openbase_dir enabled (from apache config): php_admin_value open_basedir /srv/www/domain/htdocs
extension from https://www.joomlashowroom.com/products/auto-update-for-joomla tries to unzip a joomla-update-zip-file to
/srv/www/domain/htdocs via JArchive::extract which is using JFolder::create.

in JFolder::create

[...]
// Check if parent dir exists
$parent = dirname($path);
if (!JFolder::exists($parent)) {
[...]

the parent folder (/srv/www/domain/) is checked but this is not allowed because of open_basedir ->Warnings

But it seems JArchive::extract (libraries/joomla/archive/zip.php::extractNative()) is failing because of this warnings (line 291)

Expected result

return true

Actual result

with debugging enabled
somethings with "loop detected"

then JArchive::extract is failing (can't create destination)

After is disabled this code from libraries/joomla/archive/zip.php::extractNative()
// Make sure the destination folder exists
if (!JFolder::create($destination))
{
return $this->raiseWarning(100, 'Unable to create destination');
}

everything was working fine

System information (as much as possible)

Additional comments

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
4.00

avatar jonathan00 jonathan00 - open - 14 Dec 2016
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Dec 2016
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 Apr 2017

@jonathan00 can you please give System Informations?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13214.

avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Apr 2017
Status New Information Required
avatar jonathan00
jonathan00 - comment - 8 May 2017

hi,
what do you need?

running ubuntu 14.04 with apache 2.4 and php 5.5
in my apache conf:
...
php_admin_value open_basedir /srv/domain/htdocs
...

so php doesn't have/can access to /srv/domain/ (parentpath), JFolder::create will fail, see above


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13214.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 9 May 2017

have now seen on Issue Tracker its about Joomla 3.6.5

avatar franz-wohlkoenig franz-wohlkoenig - change - 27 May 2017
Status Information Required Discussion
avatar jonathan00
jonathan00 - comment - 25 Jul 2017

still exists with joomla 3.7.4


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13214.

avatar rvalitov
rvalitov - comment - 2 Dec 2017

Still exists in Joomla 3.8.1

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Dec 2017

@rvalitov do you mean #17349 is a Duplicate?

avatar rvalitov
rvalitov - comment - 2 Dec 2017

@franz-wohlkoenig no it's not. #17349 is necessary, but solves only one problem, and it's not enough for fixing current issue, because JArchive::extract still tries to create destination folder which already exists. But I think the core reason of both issues is the same: the open_basedir should be processed more carefully.

avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar roland-d
roland-d - comment - 2 May 2018

I am going to close this as we have a PR #20280

avatar roland-d roland-d - close - 2 May 2018
avatar roland-d roland-d - change - 2 May 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-05-02 14:52:48
Closed_By roland-d
Labels Added: J3 Issue

Add a Comment

Login with GitHub to post a comment