Skip to content

JArchive::extract fails because of warnings (from JFolder::create) #13214

@jonathan00

Description

@jonathan00

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions